Median of Two Sorted Arrays - Leetcode 4Problem - Leetcode Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Example 1: Input: nums1 = [1,3], nums2 = [2] Output: 2.00000 ...3 min read·jyotirmoy.hashnode.devJan 7, 2024
Time Based Key-Value Store - Leetcode 981Problem - Leetcode Design a time-based key-value data structure that can store multiple values for the same key at different time stamps and retrieve the key's value at a certain timestamp. Implement the TimeMap class: TimeMap() Initializes the obje...3 min read·jyotirmoy.hashnode.devJan 3, 2024
Search in Rotated Sorted Array - Leetcode 33Problem - Leetcode There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly rotated at an unknown pivot index k (1 <= k < nums.length) such that the resulting array is [...3 min read·jyotirmoy.hashnode.devJan 2, 2024
Find Minimum in Rotated Sorted Array - Leetcode 153Optimize your Go code with this snippet for finding the minimum element in sorted and rotated arrays. Efficient binary search tailored for seamless naviga..3 min read·jyotirmoy.hashnode.devNov 13, 2023
Koko Eating Bananas - Leetcode 875Koko loves to eat bananas. There are n piles of bananas, the i<sup>th</sup> pile has piles[i] bananas. The guards have gone and will come back in h hours. Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of ban...3 min read·jyotirmoy.hashnode.devOct 25, 2023