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 […]