All Posts

1276 articles

dsa2 min read

Maximum Frequency Stack

Design a stack that pops the most frequent element, breaking ties by most recently pushed, using frequency-bucket stacks.

Read →
dsa2 min read

Minimize Deviation in Array

Minimize max-min of an array by doubling odd numbers and repeatedly halving the max using a max-heap.

Read →
dsa1 min read

Find Right Interval

For each interval find the interval with the smallest start point >= the end point using sorted starts and binary search.

Read →
Page 73 of 256