随笔分类 - Leetcode Solution
My leetcode oj solution
摘要:Total Accepted: 12400 Total Submissions: 83230Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 < version...
阅读全文
摘要:Total Accepted: 31557 Total Submissions: 116793Given a triangle, find the minimum path sum from top to bottom.Each step you may move to adjacent numbe...
阅读全文
摘要:1 class Solution { 2 public: 3 int strStr(char *haystack, char *needle) { 4 5 int i = 0 , skip[256]; 6 char *str = haystack, *substr = n...
阅读全文
摘要:1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), ne...
阅读全文
摘要:1 #define ADDITION '+' 2 #define SUBSTRACTION '-' 3 #define MULTIPLICATION '*' 4 #define DIVISION '/' 5 6 7 class Solution { 8 public: 9 se...
阅读全文
摘要:1 class Solution { 2 public: 3 vector ret; 4 string src; 5 int len; 6 unordered_set added; 7 vector restoreIpAddresses(string...
阅读全文
浙公网安备 33010602011771号