Understanding Binary Search: A Complete GuideWhen to use binary search? Use binary search when→ The dataset is sorted binary search only works on only sorted arrays Fast lookups are needed With a time complexity of O(log n), binary search is much faster than linear search (O(n)) for large d...1EFeb 13, 2025 · 2 min readsidhantjaiswalsj-datastructures.hashnode.dev
Understanding Arrays in Java: A Beginner's GuideWhat 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 element can be accessed using an index. Arrays are dynamically created objects in java which means → C...Feb 11, 2025 · 4 min readsidhantjaiswalsj-datastructures.hashnode.dev
DSA Community ChapterArrays/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 Stock 53. Maximum Subarray 3.sum 11. Container With Most Water 238.Product of Array Except Self 724. Fi...Feb 11, 2025 · 1 min readsidhantjaiswalsj-datastructures.hashnode.dev
Cycle Sort Technique: Improve Your Sorting Skillscycle 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 ? Note→ if u have to sort numbers staring from 1 to n just use cycle sort Cycle Sort - Time and Space...Feb 9, 2025 · 3 min readsidhantjaiswalsj-datastructures.hashnode.dev
How Bubble Sort Works: A Simple GuideLogic→ 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 of array - i times its doing so because if we run loop 1st time it will sort the loop keeping the bi...Feb 8, 2025 · 4 min readsidhantjaiswalsj-datastructures.hashnode.dev