把字符串转换成整数
This commit is contained in:
+12
-5
@@ -44,6 +44,15 @@ public:
|
||||
* @return
|
||||
*/
|
||||
std::string reverse_left_words(std::string s, int n);
|
||||
|
||||
/**
|
||||
* 剑指 Offer 67. 把字符串转换成整数
|
||||
*
|
||||
* @url https://leetcode.cn/leetbook/read/illustration-of-algorithm/58pq8g/
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
int str_to_int(std::string str);
|
||||
};
|
||||
|
||||
class ListNode {
|
||||
@@ -72,10 +81,9 @@ public:
|
||||
* @return
|
||||
*/
|
||||
ListNode *reverse_list(ListNode *head);
|
||||
ListNode* reverse_list(ListNode* cur, ListNode* pre);
|
||||
ListNode *reverse_list(ListNode *cur, ListNode *pre);
|
||||
};
|
||||
|
||||
|
||||
class Node {
|
||||
public:
|
||||
int val;
|
||||
@@ -95,7 +103,7 @@ public:
|
||||
* @param head
|
||||
* @return
|
||||
*/
|
||||
Node* copy_random_list(Node* head);
|
||||
Node *copy_random_list(Node *head);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -123,6 +131,5 @@ private:
|
||||
* @param k
|
||||
* @return
|
||||
*/
|
||||
std::vector<int> max_sliding_window(std::vector<int>& nums, int k);
|
||||
|
||||
std::vector<int> max_sliding_window(std::vector<int> &nums, int k);
|
||||
}
|
||||
Reference in New Issue
Block a user