55. LL- hard
1. Flatten LL✅ 2. Rotate LL✅ 3. reverse LL in groups of size K✅ 4. Clone LL with random pointer & next pointer✅ 5. Design Browser History✅ 6. LRU cache✅ 7. LFU cache🔥✅ ----------------------------------------------------------------------------------------------------------------------------- 1. Reverse in groups of K step-1: put temp at head step-2: figure out kth node step-3: point kth node's next to null but before it preserve the next node step-4: reverse this group of LL step-5: do , head = kth node & prvNode = temp step-6: do, temp = next node (which we preserved in step 3) step-7: repeat from step 2 step-8: if for a group there are < k elements, then attach all elements of such group starting from temp to the previous node. ----------------------------------------------------------------------------------------------------------------------------- 2. Rotate a LL -----------------------------------------------------------------------------------------------...