Articles by Tag #binarysearch

Browse our collection of articles on various topics related to IT technologies. Dive in and explore something new!

Making binary search slower

Experience the power of binary search with a creative twist! By adding a 1-second delay per iteration, this post visualizes how the algorithm efficiently narrows down massive datasets, making its logarithmic scaling tangible. Perfect for learners and educators!

Learn More 12 1Jan 18

Off-by-1 again in your LeetCode binary search solution?

“Although the basic idea of binary search is straightforward, the details are surprisingly...

Learn More 8 4May 16

Understanding Binary Search: A Powerful Algorithm for Efficient Searching

Introduction Binary search is an efficient algorithm used to find an element in a sorted array or...

Learn More 6 0Sep 19 '24

What are the time complexity and applicability differences between binary and ternary search in Java?

Binary Search and Ternary Search are both divide-and-conquer algorithms used to find elements in a...

Learn More 1 0Jul 16

Linear Search vs. Binary Search: A Practical Guide in Go

Hello, in this post I am going to talk about different types of search algorithms. In essence, I am...

Learn More 1 0Apr 21

Two best non overlapping events

Problem Recursive approach: leading to TLE TC: O(2^n) exponential, since at every max() call we have...

Learn More 1 0Sep 16 '24

Maximum Candies Allocated to K Children

Problem //same as coco eating bananas, //capacity to ship packages within d days //aggresive...

Learn More 0 0Mar 14

House Robber IV

Problem TC: O(nlog(Max(nums))) class Solution { public int minCapability(int[] nums, int k)...

Learn More 0 0Mar 15

Pattern 5: Binary Search

List of problems I have solved so far Easy Medium Hard List of problems I have...

Learn More 0 0Dec 14 '24

Minimum Time to repair cars

Problem TC: O(nlog(k)), where k is the max time in the range between 1 to r*n^2 class Solution { ...

Learn More 0 0Mar 16

Bitonic Point

Problem TC: O(logn) // User function Template for Java class Solution { public int...

Learn More 0 0Jul 1