Description Submission Greedy Strategy
Array Manipulation
Description Submissions Submission 1 O(n^2) exceeds the time limit for large test case a naive solution Submission 2 Focus on the less changed value, the […]
Minimum Swaps 2
Description Submission Swap the one at wrong position to the right position
New Year Chaos
Description Any O(n^2) algorithm will exceed the time limit Submission Submission 1 Bubble Sort: O(n^2), exceeds the time limit for large n’s The count should […]
Arrays: Left Rotation
Description Submission Vector constructor Subvector Vector concatenation The insertion should be at res.end() instead of prev(res.end()) References https://stackoverflow.com/questions/201718/concatenating-two-stdvectors https://stackoverflow.com/questions/421573/best-way-to-extract-a-subvector-from-a-vector http://www.cplusplus.com/reference/vector/vector/insert/
Sock Merchant
Description Submission O(nlogn): Fast and Straight-forward for small-size problems. Submission(17 Days Before) It’s the second time I solve this problem. The solution has been quite […]
The Coin Change Problem
Description Submission Total Unique Ways To Make Change References https://www.youtube.com/watch?v=DJ4a7cmjZY0 https://algorithms.tutorialhorizon.com/dynamic-programming-coin-change-problem/