摘要:
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on Wikipedia: ... 阅读全文
posted @ 2015-07-23 12:24
鸭子船长
阅读(179)
评论(0)
推荐(0)
摘要:
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to thedefinition of LCA on Wikipedia: “The lowest ... 阅读全文
posted @ 2015-07-23 12:23
鸭子船长
阅读(215)
评论(0)
推荐(0)
摘要:
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is1 -> 2 -> 3 -> ... 阅读全文
posted @ 2015-07-23 12:21
鸭子船长
阅读(134)
评论(0)
推荐(0)
摘要:
Given an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].Solv... 阅读全文
posted @ 2015-07-23 12:20
鸭子船长
阅读(121)
评论(0)
推荐(0)