Skip to main content

Posts

Showing posts from July, 2024

Binary Search: Algorithms

Binary Search: Algorithms What is Binary Search? Binary Search is an interval searching algorithm used to search for an item in the sorted list. It works by repeatedly dividing the list into two equal parts and then searching for the item that is the part where it can possibly exist. Unlike linear search, there are a few conditions for applying binary search: The list must be sorted. Random access to the list member. It means that we cannot apply the binary search in unsorted or liked data structures. Visualization of Binary Search: Algorithm for Binary Search in C Let [X]   be the element we are searching for, and the array is sorted in the ascending order. Compare [X] with the middle element of the array.   If [X]  matches with the middle element, we return the index of the middle element.   Else if [X]  is greater than the middle element, it means that [X]  can only lie in the right half subarray after the middle element. So, we repeat steps 1 and 2 for ...

About Me

Hello everyone, I’m Harilal Sah Kanu, and I’m thrilled to share my journey from the serene landscapes of Nepal to the bustling educational environment of India, where I’m currently pursuing my dream in Computer Science Engineering (CSE) at Parul University. My journey began in the beautiful and culturally rich country of Nepal. Growing up in this vibrant land, I was always fascinated by technology and the potential it held. My formal introduction to the world of computing came during my time at Shree Durga Model Secondary School. It was here, in the 10th standard, that I encountered my first programming language. The experience of writing my first code, a simple "Hello, World!" program in C, was nothing short of magical. It was as if I had unlocked a door to a new dimension where creativity and logic merged seamlessly. This moment sparked a profound interest in the field of Computer Science, shaping my future aspirations. After completing my secondary education, I pursued my ...