07 2018 档案

摘要:题目描述: 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 s 阅读全文
posted @ 2018-07-31 20:07 gszzsg 阅读(78) 评论(0) 推荐(0) 编辑
摘要:题目描述: A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0 阅读全文
posted @ 2018-07-31 18:58 gszzsg 阅读(120) 评论(0) 推荐(0) 编辑
摘要:题目描述: Given a directed, acyclic graph of N nodes. Find all possible paths from node 0 to node N-1, and return them in any order. The graph is given as 阅读全文
posted @ 2018-07-30 22:23 gszzsg 阅读(116) 评论(0) 推荐(0) 编辑
摘要:题目描述: Let's call an array A a mountain if the following properties hold: A.length >= 3 There exists some 0 < i < A.length - 1 such that A[0] < A[1] < 阅读全文
posted @ 2018-07-29 21:41 gszzsg 阅读(74) 评论(0) 推荐(0) 编辑
摘要:问题描述: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others 阅读全文
posted @ 2018-07-29 21:20 gszzsg 阅读(99) 评论(0) 推荐(0) 编辑
摘要:题目描述: We are given the head node root of a binary tree, where additionally every node's value is either a 0 or a 1. Return the same tree where every s 阅读全文
posted @ 2018-07-29 15:59 gszzsg 阅读(114) 评论(0) 推荐(0) 编辑
摘要:题目描述: Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to  阅读全文
posted @ 2018-07-29 15:38 gszzsg 阅读(119) 评论(0) 推荐(0) 编辑
摘要:题目描述: We have a two dimensional matrix A where each value is 0 or 1. A move consists of choosing any row or column, and toggling each value in that ro 阅读全文
posted @ 2018-07-29 11:57 gszzsg 阅读(201) 评论(0) 推荐(0) 编辑
摘要:题目描述: Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally m 阅读全文
posted @ 2018-07-29 10:31 gszzsg 阅读(135) 评论(0) 推荐(0) 编辑
摘要:题目描述: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, 阅读全文
posted @ 2018-07-28 21:10 gszzsg 阅读(103) 评论(0) 推荐(0) 编辑
摘要:题目描述: Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: Construct the maximum tree by the given a 阅读全文
posted @ 2018-07-28 16:14 gszzsg 阅读(112) 评论(0) 推荐(0) 编辑
摘要:题目描述: International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a"maps to ".-", "b 阅读全文
posted @ 2018-07-28 09:41 gszzsg 阅读(90) 评论(0) 推荐(0) 编辑
摘要:题目描述: Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Input: "Hello" Output: "h 阅读全文
posted @ 2018-07-28 08:58 gszzsg 阅读(94) 评论(0) 推荐(0) 编辑
摘要:题目描述: In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the height of 阅读全文
posted @ 2018-07-27 21:25 gszzsg 阅读(214) 评论(0) 推荐(0) 编辑
摘要:题目描述: You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in Sis a type of 阅读全文
posted @ 2018-07-26 19:27 gszzsg 阅读(101) 评论(0) 推荐(0) 编辑
摘要:英文版的LeetCode经常性登陆不上,前面都是在牛客网上做的题目,但是每道题都是只有简单的描述,没有example,对于输入细节完全不知道。 还好今天LeetCode可以登陆,以后在LeetCode上做题。 阅读全文
posted @ 2018-07-26 19:17 gszzsg 阅读(73) 评论(0) 推荐(0) 编辑
摘要:题目描述: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*,/. Each operand may be an integer or another 阅读全文
posted @ 2018-07-25 19:58 gszzsg 阅读(195) 评论(0) 推荐(0) 编辑
摘要:题目描述: Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the near 阅读全文
posted @ 2018-07-25 10:36 gszzsg 阅读(132) 评论(0) 推荐(0) 编辑