Description Submissions Submission I Submission II References https://stackoverflow.com/questions/28148205/copy-a-vector-to-another-vector-in-reverse-order/28148217 http://www.cplusplus.com/reference/algorithm/reverse_copy/
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 […]