上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into some number of "chunks" (partitions), and individuall 阅读全文
posted @ 2018-01-26 19:27 Zzz...y 阅读(1338) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. 判断字符串是不是回文,最多可以删除字符串的一个元素来使它成为回文。 解决:从字符 阅读全文
posted @ 2018-01-20 21:35 Zzz...y 阅读(198) 评论(0) 推荐(0) 编辑
摘要: A string S of lowercase letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one p 阅读全文
posted @ 2018-01-15 15:01 Zzz...y 阅读(384) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of integers, you can perform operations on the array. In each operation, you pick any nums[i] and delete it to earn nums[i] points 阅读全文
posted @ 2018-01-08 20:43 Zzz...y 阅读(214) 评论(0) 推荐(0) 编辑
摘要: ou are standing at position 0 on an infinite number line. There is a goal at position target. On each move, you can either go left or right. During th 阅读全文
posted @ 2018-01-06 20:31 Zzz...y 阅读(1105) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2018-01-02 20:06 Zzz...y 阅读(327) 评论(0) 推荐(0) 编辑
摘要: Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t 阅读全文
posted @ 2017-12-31 15:38 Zzz...y 阅读(267) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2017-12-29 21:33 Zzz...y 阅读(199) 评论(0) 推荐(0) 编辑
摘要: In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as 阅读全文
posted @ 2017-12-27 21:32 Zzz...y 阅读(244) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文
posted @ 2017-12-20 20:58 Zzz...y 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页