How to implement binary search in JavaScript

后端 未结 4 1524
醉梦人生
醉梦人生 2020-12-21 15:36

https://www.khanacademy.org/computing/computer-science/algorithms/binary-search/p/challenge-binary-search

I was following the pseudo code to implement algorithm on t

4条回答
  •  無奈伤痛
    2020-12-21 15:50

    you only have to uncomment the Program.assertEqual like this :

    Program.assertEqual(doSearch(primes, 73), 20);
    

    not like this :

    //Program.assertEqual(doSearch(primes, 73), 20);
    

提交回复
热议问题