#dsa
Read more stories on Hashnode
Articles with this tag
When to use binary search? Use binary search when→ The dataset is sorted binary search only works on only sorted arrays Fast lookups are needed ...
What is Array? An array is a data structure that allows you to store multiple elements of the same data type in a contiguous block of memory. Each...
Arrays/Lists problem on Leetcode Check out arrays in java notes at → Arrays Data-structure Notes in java 1. Two Sum 121. Best Time to Buy and Sell...
cycle sort Algorithm It works by swapping the value of element by comparing with the index position Even wondered why Cycle sort and When to use it...
Logic→ We take two nested loops the outer loop which will run from 0 to the length of items in array and the second loop running from 1 to the length...
Algorithmic Steps: To perform a linear search, we follow these steps: Accept the target element and the collection as inputs. Begin traversing the...