摘要:
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note... 阅读全文
posted @ 2014-09-13 19:37
yqc
阅读(90)
评论(0)
推荐(0)
摘要:
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL. 1 /*... 阅读全文
posted @ 2014-09-13 19:36
yqc
阅读(134)
评论(0)
推荐(0)
摘要:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2014-09-13 19:35
yqc
阅读(86)
评论(0)
推荐(0)
摘要:
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an... 阅读全文
posted @ 2014-09-13 19:34
yqc
阅读(88)
评论(0)
推荐(0)
摘要:
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo... 阅读全文
posted @ 2014-09-13 19:33
yqc
阅读(103)
评论(0)
推荐(0)
摘要:
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =... 阅读全文
posted @ 2014-09-13 19:32
yqc
阅读(100)
评论(0)
推荐(0)
摘要:
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ask... 阅读全文
posted @ 2014-09-13 19:17
yqc
阅读(123)
评论(0)
推荐(0)
摘要:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2014-09-13 19:15
yqc
阅读(63)
评论(0)
推荐(0)
摘要:
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu... 阅读全文
posted @ 2014-09-13 19:12
yqc
阅读(71)
评论(0)
推荐(0)
摘要:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 1 /** 2 ... 阅读全文
posted @ 2014-09-13 19:09
yqc
阅读(85)
评论(0)
推荐(0)

浙公网安备 33010602011771号