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 […]
520钻石争霸赛
7-1 考试周 (5point(s)) Submission 7-2 真的恭喜你 (10point(s)) Submission 7-3 平均成绩 (10point(s)) Submission 7-4 古风A+B (15point(s)) Submission 7-5 猜近似数字 (15point(s)) Submission 7-6 随机输一次 (20point(s)) Submission 7-7 阶乘的非零尾数 (20point(s)) Submission 7-8 三足鼎立 (25point(s)) Submission
阅文 C++研发实习生笔试
前面还有两大题,单选题和多选题,1.5小时,期间遇到CLion无法输入EOF(后来发现是CMD+D以前做的题的测试样例都是先输入多少样例然后再输入样例的),前面基本上电脑上没调试直接交了都通过了。做到附加题剩20分钟,C++的thread库以前没用过,最后20分钟就在用pthread乱写,最后没提交。(当然现在已经学习过了,闭卷和可以看文档还是有挺大区别的) C++ Basics I. Remove the Duplicates(Vector Basics) Description Given a single line of integers separated by space, store them in a vector and then […]
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/