Floor and Ceiling in a sorted array | GeeksforGeeks

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • Explanation for the article: www.geeksforgee...
    This video is contributed by Harshit Jain.
    Read More: www.geeksforge...

Komentáře • 7

  • @hermesmercuriustrismegistu4841

    Thx a lot for this awesome video! I love Geeks for Geeks videos and love the website! Another good job! Another good video!

  • @yaseerahmed8478
    @yaseerahmed8478 Před 3 lety

    What is low and high here??
    Is that the index or array element??

  • @mohammadmujahid8850
    @mohammadmujahid8850 Před 5 lety +3

    Why linear serach is so complicated why not just:
    private static int ceilOfArr(int[] givenArr, int x) {
    for (int i = 0; i < givenArr.length; i++) {
    if (givenArr[i] >= x)
    return givenArr[i];
    }
    return -1;
    }
    ?

  • @malharjajoo7393
    @malharjajoo7393 Před 6 lety +3

    This is not the simplest implementation.