摘要:
Given a binary tree, return the values of its boundary in anti clockwise direction starting from root. Boundary includes left boundary, leaves, and ri 阅读全文
摘要:
During the NBA playoffs, we always arrange the rather strong team to play with the rather weak team, like make the rank 1 team play with the rank nth 阅读全文
摘要:
Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: 阅读全文
摘要:
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
摘要:
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe 阅读全文
摘要:
536. Construct Binary Tree from String You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input repre 阅读全文
摘要:
527. Word Abbreviation Given an array of n distinct non empty strings, you need to generate minimal possible abbreviations for every word following ru 阅读全文
摘要:
问题描述 Given a picture consisting of black and white pixels, and a positive integer N, find the number of black pixels located at some specific row R an 阅读全文
摘要:
问题描述 In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial 阅读全文
摘要:
Lonely Pixel I 两种算法之间的性能比较 今天参加LeetCode Weekly Contest 22,第二题 "Lonely Pixel I" 问题描述如下: Given a picture consisting of black and white pixels, find the 阅读全文
摘要:
问题描述 You need to find the largest element in each row of a Binary Tree. Example: Input: 1 / \ 2 3 / \ \ 5 3 9 Output: [1, 3, 9] 算法分析 使用两个队列,逐层遍历二叉树的各个 阅读全文
摘要:
####问题描述 Given a binary tree, find the left most element in the last row of the tree. #####Example 1: Input: 2 / \ 1 3 Output: 1 #####Example 2: Input 阅读全文
摘要:
CentOS6.5系统下设置自己安装的程序开机自动启动 方法1. 把启动程序的命令添加到 /etc/rc.d/rc.local 文件中,比如设置开机启动 mysqld: !/bin/sh This script will be executed after all the other init sc 阅读全文