Advertisement · 728 × 90
#
Hashtag
#BinarySearch
Advertisement · 728 × 90
Preview
#binarysearch #algorithmreels #codingjourney #codingbrushup | ClassBoxes Technologies Think fast. Search faster. 🔎 #BinarySearch #AlgorithmReels #CodingJourney #CodingBrushup www.classboxes.com

Think fast. Search faster. 🔎
#BinarySearch #AlgorithmReels #CodingJourney #CodingBrushup

www.classboxes.com

0 0 0 0
Preview
House Robber IV Problem TC: O(nlog(Max(nums))) class Solution { public int minCapability(int[] nums, int k) { int index = 0; int low = Integer.MAX_VALUE; int high = 0; for(int i : nums){ low = Math.min(low, i); high = Math.max(high, i); } int val = Integer.MAX_VALUE; while(low<=high){ int mid = (low+high)/2; if(isPossible(mid,nums,k)){ //note: if mid is possible and is not present in nums[] then also it is valid as we will reduce search space low,mid-1 hence we will find the valid value (smaller than current mid) val = Math.min(val,mid); // we have to find min of all the max values possible high = mid-1; } else low = mid+1; } return val; } public boolean isPossible(int target, int arr[], int k){ int count =0; for(int i = 0;i<arr.length;){ if(arr[i]<=target) {/// if arr[i] is less than the guess 'target' then we have to check for next non consecutive index value i = i+2; count++; } else i++;// other wise check for next index value } return count>=k; } }
0 0 0 0
Post image

Waiting patiently for Halftime performance so I'm working on binary search in rotated sorted array.

If the algorithm does not make sense to me, I'll run it back a few times by deleting and typing it out again.

You learn so much more :)
Who else is waiting for K-Dot?

#binarysearch

6 0 0 0
My Advent of Code output for day 18.
Part 1: [redacted]
Part 2: [redacted]
  Time: 5784µs [Part 1: 1864µs, Part 2: 3920µs]

My Advent of Code output for day 18. Part 1: [redacted] Part 2: [redacted] Time: 5784µs [Part 1: 1864µs, Part 2: 3920µs]

Last year was my first #adventofcode, and I had several solutions that took several minutes to run. This year I'm on track to get sub 1-second solutions every day! Today's solution consistently runs in under 6 ms, which I'm very happy about. #binarysearch

3 0 0 0
YouTube
YouTube Share your videos with friends, family, and the world

Cuprum 2929 base game features Pythagorean theorem! However, other concepts can be demonstrated for creative problem solving! Learn the basic idea behind binary search with simple arithmetics!

#gamedev #algorithms #binarysearch #programming

youtube.com/watch?v=IQFS...

9 3 1 0
Preview
alphaguess: a word game Guess the word of the day. Guesses reveal where the word is positioned alphabetically. Everyone plays the same word each day.

Hmmm. Usually this game is ego-adjusting. Today, it was ego-boosting. #BinarySearch #DumbLuck #SoManyWordsToChooseFrom

🧩 Puzzle #477
🤔 9 guesses
⏱️ 55s
🔗 alphaguess.com

1 1 1 0