欢迎来到PJCK的博客

上一页 1 2 3 4 5 6 7 ··· 15 下一页
摘要: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文
posted @ 2019-05-10 09:35 PJCK 阅读(105) 评论(0) 推荐(0) 编辑
摘要: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文
posted @ 2019-05-10 09:31 PJCK 阅读(134) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2019-05-09 19:57 PJCK 阅读(157) 评论(0) 推荐(0) 编辑
摘要: In a row of dominoes, A[i] and B[i] represent the top and bottom halves of the i-th domino. (A domino is a tile with two numbers from 1 to 6 - one on 阅读全文
posted @ 2019-05-07 13:06 PJCK 阅读(303) 评论(0) 推荐(0) 编辑
摘要: There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor 阅读全文
posted @ 2019-05-07 11:36 PJCK 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the resulting paren 阅读全文
posted @ 2019-05-06 22:19 PJCK 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given an array A of integers, we must modify the array in the following way: we choose an i and replace A[i] with -A[i], and we repeat this process K  阅读全文
posted @ 2019-05-06 22:08 PJCK 阅读(97) 评论(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 @ 2019-05-06 21:32 PJCK 阅读(166) 评论(0) 推荐(0) 编辑
摘要: We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we 阅读全文
posted @ 2019-05-06 21:16 PJCK 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2019-05-06 20:37 PJCK 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
posted @ 2019-05-05 14:30 PJCK 阅读(122) 评论(0) 推荐(0) 编辑
摘要: You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rota 阅读全文
posted @ 2019-05-01 10:29 PJCK 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2019-04-29 20:32 PJCK 阅读(88) 评论(0) 推荐(0) 编辑
摘要: In a binary tree, the root node is at depth 0, and children of each depth knode are at depth k+1. Two nodes of a binary tree are cousins if they have 阅读全文
posted @ 2019-04-28 22:42 PJCK 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For 阅读全文
posted @ 2019-04-28 20:17 PJCK 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 15 下一页