Author: Narendra Jha | Published on: March 15, 2020
Given an unsorted array, trim the array such that twice of minimum is greater than the maximum in the trimmed array. Elements should be removed from either end of the array. The number of removals should be minimum.
Author: Narendra Jha | Published on: Dec 29, 2019
Least Recently Used (LRU) Cache is one of the most widely used caching technique. In this blog post, I talk about how to efficiently implement LRU Cache data structure. So let's jump in...
Author: Narendra Jha | Published on: Dec 28, 2019
Tim sort is widely used as preferred choice of sorting algorithm in many languages' library implementation, including Python and Java. In this post, I talk about what is Tim sort? Why is it preferred over other well known sorting algorithms in some instances, and not in others? Why does it perform better for certain data-types, and not for others? so let's dig in...