Binary Search

Binary Search In Hindi – Data Structure In Hindi

Data Structure
Loading...

Binary Search In Hindi – Data Structure In Hindi – Iss Post Mein Hum Padhenge Ek Aur Searching Algorithm Ke Baare Mein Wo Hai Binary Search, hum Dekhenge ke ye Kaise Kaam Karti Hai aur ye kitni Useful Hai Searching Karne Ke Liye.

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

Binary Search In Hindi

Ab Jante Hai Binary Search Ke Baare Mein, Sabse Basic Requirement Binary Search Ki hai Ke Jo Hamara Data Hoga Wo Sorted Order Mein Hona Chahiye. ( Sorted Meaning Chote se Bade Ke order Mein Data Ho Toh Usko Sorted Data Kehte Hai ) otherwise Ye Algorithm Use Nahi Hogi.

Ye kaam karti hai Divide and Conquer ke Priciple par Jiska Basic Matlab Hai Ke Data Ko Narrow Down Karo Fir Apna Search Ka Opeartion Implement Karo,

Also ReadLinear Search

Isko Aage Hum Example Se Samjhenge. Iss Searching Technique Mein Hum Apne Data Ko Har Baar(Har Ek Operation Mein) Half mein Divide Karenge or fir Apni Value Ko Middle Mein Search Karenge agar middle se Kam Hogi Toh Lower Side Mein Half Karenge or Agar Value Middle Se Jyada Hogi toh Higher Half Mein Divide Karenge.

Iski Time Complexity Hoti Hai O(NlogN) Jiska Matlab Hai Ke Binary Search, Linear Search Se Fast Implement Hoti Hai.

Steps For Finding 74 in given Sorted Array :-

  • Ek Pointer Rahega Starting of Array par, Index=0 or Ek Rahega Ending Par Index=N-1,yaha par N=8 hai. middle=(0 + 7)/2=3
  • Ab 74 ko check Karo Ke vo middle Mein Hai Ya Nahi, Yha Middle Ki value Hai 96, Kyuki 74 < 96 Toh Isliye 74 Middle Ke left Hoga
  • Ab, end Pomter Ko Middle -1 Par Set Karo i.e, 3-1=2 par
  • Ab dubara Middle Nikaalo, middle aaya hai middle=(0+2)/2=1 or index=1 par value hai 56 , kyuki 74 > 56 toh 76 right mein Hoga, Toh Isliye Starting Pointer Ko set Karo Middle + 1 par toh Start= 1+1=2,
  • Ab dobara Middle Nikalo toh middle=(2+2)/2=2, AB check Karo Index 2 Par Value Kya Hai, Kyuki index 2 Ki value Hai 74 toh Hamara Element Mil Gayaa Hai Aur Hamara Search Success Ho Jaega.

Agli Vedio mein Hum Jump Searching ke Baare Mein Samjhenge, Thank You.

Also Read – Introduction to Search Algorithms

Friends Mujhe Umeed Hai Ki Aapko Binary Search Algorithms In Hindi Ke Bare Mai 100% Jankari Ho Gayi Hogi | Agar Aapko Learn Karne Main Dikkat Aa Rahi Hai To Aap Mere Se Contact Kar Sakte Hai |

Leave a Reply

Your email address will not be published.