摘要: 题目 Given a sorted array nums, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra 阅读全文
posted @ 2018-09-29 09:57 shinjia 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 题目 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. Examp 阅读全文
posted @ 2018-09-29 09:06 shinjia 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: 阅读全文
posted @ 2018-09-28 16:41 shinjia 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目 Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exa 阅读全文
posted @ 2018-09-28 15:59 shinjia 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 题目 Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: 阅读全文
posted @ 2018-09-28 13:38 shinjia 阅读(110) 评论(0) 推荐(1) 编辑
摘要: 题目 Given a 32 bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: 123 Output: 321 Example 3: Input: 阅读全文
posted @ 2018-09-28 12:02 shinjia 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have 阅读全文
posted @ 2018-09-28 11:20 shinjia 阅读(83) 评论(0) 推荐(0) 编辑