Learn Binary Search with Visualizer | JavaScript

Publicado em: 27 July 2022
no canal de: LetCode with Koushik
1,407
26

Binary Search is a searching technique which works on the Divide and Conquer approach. It is used to search for any element in a sorted array. Compared with linear, binary search is much faster with a Time Complexity of O(logN)

Steps:
BASE CONDITION: If starting index is greater than ending index return false.
Compute the middle index.
Compare the middle element with number x. If equal return true.
If greater, call the same function with ending index = middle-1 and repeat step 1.
If smaller, call the same function with starting index = middle+1 and repeat step 1.

Use the visualizer:
https://pythontutor.com/render.html#m...

Source code:
https://github.com/ortoniKC/JS_DS_ALGO

(https://www.geeksforgeeks.org/binary-...)

Join this channel to get access to perks:
   / @letcode  

---------------------------------------------------------------------
😊Just in case you want to support me,
🎁https://www.buymeacoffee.com/letcode

-------------------------Thank you--------------------------

Thanks for watching, if you like the video, give it a thumbs up 👆.
Sharing is caring, kindly share the video with your friends and colleagues.
Don't forget to subscribe and hit the bell 🔔 notification.

-------------------------------SOCIAL-------------------------------

📝Test Practice Site: https://letcode.in/
👥Facebook Group:   / letcode  
🐦Discord:   / discord  
📸Instagram:   / letcode.in  
🎓 LinkedIn:   / ortoni  
⛳️ XPath Extension: https://bit.ly/2T5EUCu

Join our WhatsApp group (Only for Channel Members)
http://bit.ly/3cSPCpm

#letcode #javascript


Nesta página do site você pode assistir ao vídeo on-line Learn Binary Search with Visualizer | JavaScript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário LetCode with Koushik 27 July 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,407 vezes e gostou 26 espectadores. Boa visualização!