摘要:
Delete the node at the given index for the given linked list. Examples [1, 2, 3], delete at 1 --> [1, 3] [1, 2, 3], delete at 4 --> [1, 2, 3] [1, 2, 3 阅读全文
posted @ 2018-03-27 12:46
davidnyc
阅读(158)
评论(0)
推荐(0)
摘要:
Return the number of nodes in the linked list. Examples L = null, return 0L = 1 -> null, return 1L = 1 -> 2 -> null, return 2 阅读全文
posted @ 2018-03-27 12:29
davidnyc
阅读(179)
评论(0)
推荐(0)
摘要:
Find the height of binary tree. Examples: 5 / \ 3 8 / \ \ 1 4 11 The height of above binary tree is 3. 1 public class Solution { 2 ... 阅读全文
posted @ 2018-03-27 11:23
davidnyc
阅读(84)
评论(0)
推荐(0)
摘要:
will do it later 阅读全文
posted @ 2018-03-27 05:10
davidnyc
阅读(194)
评论(0)
推荐(0)
摘要:
DFS recursive: since this is called tail recursion, you are recommended to do it in interative: time: O(h) space: O(1) Interative: 阅读全文
posted @ 2018-03-27 05:08
davidnyc
阅读(155)
评论(0)
推荐(0)
浙公网安备 33010602011771号