LeetCode:Is Subsequence

Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s and t. t i...

2017-04-29 18:20:29

阅读数 154

评论数 0

LeetCode: Top K Frequent Elements

Given a non-empty array of integers, return the k most frequent elements. For example, Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note:  ...

2017-04-23 15:31:41

阅读数 124

评论数 0

LeetCode:Odd Even Linked List

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not th...

2017-04-15 19:05:08

阅读数 132

评论数 0

LeetCode: Move Zeroes

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. For exampl...

2017-04-15 13:58:17

阅读数 121

评论数 0

LeetCode:Ugly Number

Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For...

2017-04-02 23:02:58

阅读数 284

评论数 0

取消 删除