摘要:
Implementint sqrt(int x).Compute and return the square root ofx.思路:二分查找法解决这道题class Solution {public: int sqrt(int x) { if(x1e-6) { ... 阅读全文
摘要:
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.思路:这道... 阅读全文