Floor and Ceiling in a sorted array | GeeksforGeeks

Поділитися
Вставка
  • Опубліковано 11 кві 2016
  • Explanation for the article: www.geeksforgeeks.org/search-f...
    This video is contributed by Harshit Jain.
    Read More: www.geeksforgeeks.org/ceiling...

КОМЕНТАРІ • 7

  • @hermesmercuriustrismegistu4841
    @hermesmercuriustrismegistu4841 4 роки тому +1

    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 3 роки тому

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

  • @mohammadmujahid8850
    @mohammadmujahid8850 4 роки тому +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 5 років тому +3

    This is not the simplest implementation.