leetcode
希希兮
就种棵树吧,始于当下
展开
-
Leetcode-20:Valid Parentheses
class Solution { public: bool isValid(string s) { stack<char> stk; map<char, char> parentheses = {{'(',')'}, {'{','}'}, {'[',']'}}; for(char c: s){ ...原创 2018-11-24 09:36:19 · 108 阅读 · 0 评论 -
Leetcode-21: Merged two sorted lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. /** * Definition for singly-linked list. * struct List...原创 2018-11-24 10:04:19 · 153 阅读 · 0 评论