摘要: 26. Remove Duplicates from Sorted Array Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return t 阅读全文
posted @ 2019-02-17 21:40 mingL 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 25. Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer 阅读全文
posted @ 2019-02-16 12:58 mingL 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. You may not modify the values in the list's nodes, onl 阅读全文
posted @ 2019-02-16 12:52 mingL 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 23. Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: 阅读全文
posted @ 2019-02-16 12:48 mingL 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 22. Generate Parentheses Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n  阅读全文
posted @ 2019-02-16 12:46 mingL 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 21. Merge 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 th 阅读全文
posted @ 2019-02-16 12:44 mingL 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 20. Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input 阅读全文
posted @ 2019-02-16 12:39 mingL 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 19. Remove Nth Node From End of List Given a linked list, remove the n-th node from the end of list and return its head. Example: 阅读全文
posted @ 2019-02-16 12:36 mingL 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 18. 4Sum Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all 阅读全文
posted @ 2019-02-16 12:32 mingL 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 17. Letter Combinations of a Phone Number Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number 阅读全文
posted @ 2019-02-15 22:58 mingL 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 16. 3Sum Closest Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return t 阅读全文
posted @ 2019-02-15 22:55 mingL 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 15. 3Sum Given an array nums of n integers, are there elements a, b, c in nums such that a + b+ c = 0? Find all unique triplets in the array which giv 阅读全文
posted @ 2019-02-14 22:04 mingL 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return 阅读全文
posted @ 2019-02-14 21:49 mingL 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 13. Roman to Integer Roman numerals are represented by seven different symbols: I, V, X, L, C, Dand M. For example, two is written as II in Roman nume 阅读全文
posted @ 2019-02-14 21:21 mingL 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 12. Integer to Roman Roman numerals are represented by seven different symbols: I, V, X, L, C, Dand M. For example, two is written as II in Roman nume 阅读全文
posted @ 2019-02-14 21:19 mingL 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 11. Container With Most Water Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines ar 阅读全文
posted @ 2019-02-14 21:17 mingL 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 10. Regular Expression Matching Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. The m 阅读全文
posted @ 2019-02-14 21:01 mingL 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 9. Palindrome Number Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: E 阅读全文
posted @ 2019-02-14 20:51 mingL 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 8. String to Integer (atoi) Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessa 阅读全文
posted @ 2019-02-14 20:49 mingL 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 7. Reverse Integer Given a 32-bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: 阅读全文
posted @ 2019-02-14 20:42 mingL 阅读(141) 评论(0) 推荐(0) 编辑