随笔分类 - LeetCode
摘要: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 as 2->1->4->3. Your a
阅读全文
摘要:Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Given s
阅读全文
摘要:Given 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 fo
阅读全文
摘要:Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the or
阅读全文
摘要:Given an array of integers, every element appears three times except for one. Find that single one. Note:Your algorithm should have a linear runtime c
阅读全文
摘要:Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n
阅读全文

浙公网安备 33010602011771号