- 博客(5)
- 资源 (1)
- 收藏
- 关注
原创 Sum of a tree
You are given a tree, and the nodes in the tree may have more than two child nodes, calculate the sum of the tree where the root to the leaf is considered as a number.public class TreeSum { priv
2013-02-24 12:54:47 2430
原创 Group of 1s in a Matrix
Given a matrix with 1s and 0s, please find the number of groups of 1s. A group is defined by horizontally or vertically adjacent 1s. For example, there are four groups of 1s in figure below.Anal
2013-02-24 12:52:57 2168
原创 Split string to palindrome
Question:Give a string, use minimum number of splits to divide the string into multiple parts in which each part a palindrome. For example, if the string is "abbad", we can split it into "abba" and
2013-02-24 12:52:08 2087
原创 O变X
给你一个n * n 的二维char数组 内部存的是 'X' 和 'O',形式如下X X X X XX O O O XX X O O XX X X O XX O X X X编写一个函数将被'X'包围的'O'统统变成'X'。 比如下标为 (1,1) (1,2) (1,3) (2,2) (2,3) (3,3)的'O'需要被变成'X',而下标
2013-02-24 12:50:24 2667
原创 Restore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return ["255.255.11.135", "255.255.111.35"]. (Order do
2013-02-03 00:55:58 1866
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人