LeetCode Remove Duplicates from Sorted List DescriptionGiven a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2-&g 6月 20 2015 #leetcode
LeetCode Merge Sorted Array DescriptionGiven two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold 6月 19 2015 #leetcode
LeetCode Remove Duplicates from Sorted Array DescriptionGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in pl 6月 19 2015 #leetcode
LeetCode Remove Duplicates from Sorted Array DescriptionFollow up for “Remove Duplicates”:What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function should return length = 5, with the first f 6月 19 2015 #leetcode
Hello World Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick 4月 14 2015
LeetCode Excel Sheet Column Number DescriptionRelated to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 4月 5 2015 #leetcode
LeetCode Swap Nodes in Pairs DescriptionGiven a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use o 4月 4 2015 #leetcode
LeetCode Number of 1 Bits DescriptionWrite a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight). For example, the 32-bit integer ’11’ has binary representation 4月 3 2015 #leetcode
LeetCode Longest Common Prefix DescriptionWrite a function to find the longest common prefix string amongst an array of strings. The original problem is here.The original code is here. 4月 3 2015 #leetcode
LeetCode Remove Element DescriptionGiven an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn’t matter what you leave beyond the new leng 4月 3 2015 #leetcode