Sort by

recency

|

24 Discussions

|

  • + 0 comments

    Interesting challenge! It’s like finding all wrestler pairs within a range that meet the height difference rule. If you enjoy problem-solving or gaming tweaks, you might also like checking out the APK Version of popular apps and games on the mentioned site. The website offers plenty of modded apps, updated game builds, and special features, making it a fun spot to explore while tackling coding tasks like this.

  • + 0 comments

    PHP solution error "Time limit exceeded"

    code:

    function solve(array $h, int $limit, array $queries) {
        $res=[];
        for($k=0;$k<count($queries);$k++) {
            $count=0;
            for ($i=$queries[$k][0];$i<=$queries[$k][1];$i++) {
                for ($j=$queries[$k][1];$j>0;$j--) {
                    if ($i==$j) break;
                    if (abs($h[$i]-$h[$j])>$limit) continue;
                    $count++;
                }
            }
            $res[]=$count;
        }
        return $res;
    }
    
    #change run oprion to:
    
    $result = solve($h,$k, $queries);
    
  • + 0 comments

    for complete solution in java c++ and c programming search for programs.programmingoneonone.com on google

  • + 1 comment

    C++ doesn't include k in the solve function definition... Given code is incomplete.

  • + 0 comments

    Can anybody please explain solution?