06 2019 档案

摘要:Design your implementation of the linked list. You can choose to use the singly linked list or the doubly linked list. A node in a singly linked list 阅读全文
posted @ 2019-06-21 09:24 蓝天下的一棵草 阅读(375) 评论(0) 推荐(0)
摘要:Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. E 阅读全文
posted @ 2019-06-18 09:27 蓝天下的一棵草 阅读(114) 评论(0) 推荐(0)
摘要:Given an input string, reverse the string word by word. Example 1: Example 2: Example 3: Note: A word is defined as a sequence of non-space characters 阅读全文
posted @ 2019-06-18 09:19 蓝天下的一棵草 阅读(135) 评论(0) 推荐(0)
摘要:Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: Note:1. 阅读全文
posted @ 2019-06-17 09:30 蓝天下的一棵草 阅读(275) 评论(0) 推荐(0)
摘要: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 spa 阅读全文
posted @ 2019-06-17 09:20 蓝天下的一棵草 阅读(121) 评论(0) 推荐(0)
摘要:Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row index starts from 0. In Pascal's trian 阅读全文
posted @ 2019-06-15 09:42 蓝天下的一棵草 阅读(184) 评论(0) 推荐(0)
摘要:Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Example 2: Note: Try to come up as many solutions as you 阅读全文
posted @ 2019-06-12 17:31 蓝天下的一棵草 阅读(128) 评论(0) 推荐(0)
摘要:Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2019-06-11 15:50 蓝天下的一棵草 阅读(142) 评论(0) 推荐(0)
摘要:Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length 阅读全文
posted @ 2019-06-11 11:20 蓝天下的一棵草 阅读(153) 评论(0) 推荐(0)
摘要:Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2019-06-10 09:31 蓝天下的一棵草 阅读(115) 评论(0) 推荐(0)
摘要:Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2019-06-05 09:14 蓝天下的一棵草 阅读(164) 评论(0) 推荐(0)
摘要:Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2019-06-05 08:57 蓝天下的一棵草 阅读(130) 评论(0) 推荐(0)
摘要:Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, yo 阅读全文
posted @ 2019-06-05 08:50 蓝天下的一棵草 阅读(168) 评论(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 "". Exampl 阅读全文
posted @ 2019-06-03 23:23 蓝天下的一棵草 阅读(129) 评论(0) 推荐(0)