上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 35 下一页

2017年9月18日

Leetcode c语言-Swap Nodes in Pairs

摘要: Title:Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list ... 阅读全文

posted @ 2017-09-18 23:37 sichenzhao 阅读(143) 评论(0) 推荐(0) 编辑

LeetCode c语言-Generate Parentheses和买票找零问题

摘要: Title:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3,... 阅读全文

posted @ 2017-09-18 17:35 sichenzhao 阅读(298) 评论(0) 推荐(0) 编辑

Leetcode c语言- Merge Two Sorted Lists

摘要: Title: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 fir... 阅读全文

posted @ 2017-09-18 13:45 sichenzhao 阅读(198) 评论(0) 推荐(0) 编辑

2017年9月17日

Leetcode c语言-Valid Parentheses

摘要: Title:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The bracke... 阅读全文

posted @ 2017-09-17 22:46 sichenzhao 阅读(145) 评论(0) 推荐(0) 编辑

Leetcode c语言-Remove Nth Node From End of List

摘要: Title:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->... 阅读全文

posted @ 2017-09-17 19:07 sichenzhao 阅读(120) 评论(0) 推荐(0) 编辑

Leetcode c语言-4Sum

摘要: Title:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadrup... 阅读全文

posted @ 2017-09-17 13:01 sichenzhao 阅读(123) 评论(0) 推荐(0) 编辑

2017年9月13日

Letter c语言-Combinations of a Phone Number

摘要: Title:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (jus... 阅读全文

posted @ 2017-09-13 23:41 sichenzhao 阅读(438) 评论(0) 推荐(0) 编辑

对递归算法的理解

摘要: 最近刷leetcode题时,碰到题目需要用到递归算法,否则基本无解。接下来结合实例谈谈本人对递归算法的理解。对递归算法的形象解释:想象用一本纯英文词典查单词,要查某一个单词的意思,翻到这个单词时,看解释,发现解释中有一个单词不认识,所以,无法明白这个要查的单词是什么意... 阅读全文

posted @ 2017-09-13 23:09 sichenzhao 阅读(182) 评论(0) 推荐(0) 编辑

Leetcode c语言-3Sum Closest

摘要: Title:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum ... 阅读全文

posted @ 2017-09-13 15:32 sichenzhao 阅读(206) 评论(0) 推荐(0) 编辑

Leetcode c语言-3Sum

摘要: Title:Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array w... 阅读全文

posted @ 2017-09-13 15:15 sichenzhao 阅读(174) 评论(0) 推荐(0) 编辑

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 35 下一页

导航