上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 29 下一页
摘要: Given an array of integers, remove the duplicate numbers in it. You should: 1. Do it in place in the array. 2. Move the unique numbers to the front of 阅读全文
posted @ 2018-08-15 06:57 jasminemzy 阅读(302) 评论(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.ExampleGiven nums 阅读全文
posted @ 2018-08-15 05:30 jasminemzy 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Find the middle node of a linked list.ExampleGiven 1->2->3, return the node with value 2.Given 1->2, return the node with value 1.ChallengeIf the link 阅读全文
posted @ 2018-08-14 12:01 jasminemzy 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Given a string and an offset, rotate string by offset. (rotate from left to right) Example Given "abcdefg". offset=0 => "abcdefg" offset=1 => "gabcdef 阅读全文
posted @ 2018-08-10 01:24 jasminemzy 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Given a rotated sorted array, recover it to sorted array in-place.What is rotated array? * For example, the orginal array is [1,2,3,4], The rotated ar 阅读全文
posted @ 2018-08-10 01:05 jasminemzy 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Calculate the a^n % b where a, b and n are all 32bit integers. Example For 231 % 3 = 2 For 1001000 % 1000 = 0 Challenge O(logn) 这里想解决的问题是当n足够大的时候,a^n会 阅读全文
posted @ 2018-08-09 06:13 jasminemzy 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Given a target number, a non-negative integer k and an integer array A sorted in ascending order, find the k closest numbers to target in A, sorted in 阅读全文
posted @ 2018-08-08 13:47 jasminemzy 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Implement strStr function in O(n + m) time. strStr return the first index of the target string in a source string. The length of the target string is 阅读全文
posted @ 2018-08-06 13:35 jasminemzy 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example Given s = "bbba 阅读全文
posted @ 2018-08-06 07:32 jasminemzy 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 时隔很久重新开始刷题,复习一下一些做过的题型,同时热身,重复的题就不重新开笔记了,仅记录在这边每天刷了哪些有个小记录和小督促。 8.3 3. Subsets, Subsets II, Longest Palindrome 8.4 2. Valid Palindrome, Longest Palind 阅读全文
posted @ 2018-08-05 09:17 jasminemzy 阅读(139) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 29 下一页