Skip to content

DSA

Algorithms, Data Structures, Competitive Coding, and problems from LeetCode with complete Solution Approach, Pseudocode, and Explanation.

Binary Search Algorithm C++

Binary Search Algorithm

The Binary Search Algorithm, a simple and faster search. But on one condition, we need a sorted array or sort the given array before we perform a binary search. Why Binary Search? We can use linear search for smaller numbers but, when having hundreds, and thousands, to compare, it would… Read More »Binary Search Algorithm

How to Reverse a Linked List

Reverse a Linked List

Yes, we are doing it today. The all-time famous interview question, Do you know how to reverse a Linked List? Well turns out, it isn’t that difficult and it’s all about logic and pointers, okay let’s get started. Alright, I already wrote a post explaining the basic operations and structure… Read More »Reverse a Linked List

Sum of Numbers in a String Code C++

Sum of Numbers in a String

Today, I found a problem where we need to find the sum of numbers in a string, the string will be a mix of alphabets, numbers, and special characters, and usually, this can be solved by iterating through each character and adding all the numbers. Example Solution Approach Given a… Read More »Sum of Numbers in a String

Linear Search Algorithm C++

Linear Search Algorithm

Linear Search, the most basic and easiest searching algorithm that we even use in our daily life. Yes, linear search is nothing but searching one after the other till we find what we want in a sequence one by one. Definition Linear Search is also known as Sequential Search, is… Read More »Linear Search Algorithm