摘要: 题目描述: 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 阅读(98) 评论(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 阅读(118) 评论(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 阅读(199) 评论(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 阅读(134) 评论(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 阅读(101) 评论(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 阅读(111) 评论(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 阅读(89) 评论(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 阅读(93) 评论(0) 推荐(0) 编辑