leetcode讲解--921. Minimum Add to Make Parentheses Valid

2018-12-18
阅读 2 分钟
1.9k
Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the resulting parentheses string is valid.

leetcode讲解--814. Binary Tree Pruning

2018-12-18
阅读 2 分钟
2.2k
We are given the head node root of a binary tree, where additionally every node's value is either a 0 or a 1.

leetcode讲解--890. Find and Replace Pattern

2018-12-18
阅读 2 分钟
1.8k
You have a list of words and a pattern, and you want to know which words in words matches the pattern.

安装java编程环境

2018-12-18
阅读 4 分钟
1.4k
首先明确自己使用的操作系统 在各个系统中的操作其实大同小异,都是以下三个步骤。下载、安装、配置环境变量(以及验证是否配置成功) 下面这个是针对Windows的 Windows版 下载JDK(java development kit) 首先要选定一个java版本,我这里选择java1.8,越新的版本一般会有越多的特性。 搜索引擎搜索:oracle java 1.8 ...

leetcode讲解--832. Flipping an Image

2018-12-17
阅读 2 分钟
2k
Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.

leetcode讲解--944. Delete Columns to Make Sorted

2018-12-17
阅读 2 分钟
2.1k
We are given an array A of N lowercase letter strings, all of the same length.

leetcode讲解--701. Insert into a Binary Search Tree

2018-12-17
阅读 2 分钟
2.6k
Given the root node of a binary search tree (BST) and a value to be inserted into the tree, insert the value into the BST. Return the root node of the BST after the insertion. It is guaranteed that the new value does not exist in the original BST.

leetcode讲解--654. Maximum Binary Tree

2018-12-17
阅读 2 分钟
1.6k
Given an integer array with no duplicates. A maximum tree building on this array is defined as follow:

leetcode讲解--905. Sort Array By Parity

2018-12-17
阅读 1 分钟
1.9k
Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.

leetcode讲解--950. Reveal Cards In Increasing Order

2018-12-16
阅读 3 分钟
2.6k
In a deck of cards, every card has a unique integer. You can order the deck in any order you want.

leetcode讲解--929. Unique Email Addresses

2018-12-16
阅读 2 分钟
1.9k
Every email consists of a local name and a domain name, separated by the @ sign.

leetcode讲解--807. Max Increase to Keep City Skyline

2018-12-16
阅读 3 分钟
1.8k
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 any number of buildings, by any amount (the amounts can be different for different buildings). Height 0 is considered to be a building as well.

leetcode讲解--938. Range Sum of BST

2018-12-16
阅读 1 分钟
3.2k
Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive).

leetcode讲解--771. Jewels and Stones

2018-12-16
阅读 2 分钟
1.4k
You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the stones you have are also jewels.

Java GC

2018-12-12
阅读 5 分钟
1.7k
从广义上讲,Clojure、JRuby、Groovy等运行于Java虚拟机上的语言及其相关的程序都属于Java技术体系中的一员。如果仅从传统意义上来看,Sun官方所定义的Java技术体系包括以下几个组成部分:

《CSAPP》读书笔记 -- 第2章:浮点数原理(小专题)

2018-12-06
阅读 9 分钟
5.2k
浮点数的作用:区别于整形数,用来表示小数。可以用来表示很大的数,或者非常接近0的小数,或者近似的做实数计算,浮点数的一般形式:$x\times 2^y$。

leetcode讲解--343. Integer Break

2017-01-15
阅读 3 分钟
3.1k
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.

leetcode讲解--217. Contains Duplicate

2017-01-15
阅读 1 分钟
2.6k
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct.

leetcode讲解--169. Majority Element

2017-01-15
阅读 2 分钟
3.3k
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.

leetcode讲解之开篇--刷题技巧

2017-01-15
阅读 1 分钟
5.1k
一直想系统的刷一套OJ(Online Judge,在线编程练习),对于锻炼自己的思维,算法能力,以及coding能力都是非常有帮助的。 说干就干吧,我选了leetcode,选这个的原因嘛: 有名气啊,大家都知道leetcode 答案多啊,上网一搜,不愁没有教程,可以给解不出题的娃提供及时反馈。 我知道答案不缺我这一份,讲解也不缺我这一...

leetcode讲解--94. Binary Tree Inorder Traversal

2017-01-13
阅读 4 分钟
2.5k
Given a binary tree, return the inorder traversal of its nodes' values.