原创 Lintcode97 Maximum Depth Of BinaryTree solution 題解

【題目描述】Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from t

原创 Lintcode96 Partition List solution題解

【題目描述】Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or

原创 Lintcode98 Sort List solution 題解

【題目描述】Sort a linked list in O(nlogn) time using constant space complexity.在O(nlogn) 時間複雜度和常數級的空間複雜度下給鏈表排序。【題目鏈接】www.lint

原创 Lintcode94 Binary Tree Maximum Path Sum solution 題解

【題目描述】給出一棵二叉樹,尋找一條路徑使其路徑和最大,路徑可以在任一節點中開始和結束(路徑和爲兩個節點之間所在路徑上的節點權值之和)。Given a binary tree, find the maximum path sum.The p

原创 Lintcode96 Partition List solution題解

【題目描述】Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or

原创 Lintcode99 Reorder List solution 題解

【題目描述】Given a singly linked list L: L0→ L1→ … → Ln-1→ Lnreorder it to: L0→ Ln→ L1→ Ln-1→ L2→ Ln-2→ …給定一個單鏈表L:L0→L1→…→Ln-

原创 Lintcode98 Sort List solution 題解

【題目描述】Sort a linked list in O(nlogn) time using constant space complexity.在O(nlogn) 時間複雜度和常數級的空間複雜度下給鏈表排序。【題目鏈接】www.lint

原创 Twitter SDE 電面面經

在網上看到twitter的招聘信息後直接投了簡歷。Twitter的效率很高,三天後就收到了郵件,要求進行在線編程測試。測試內容只有兩道算法題,要求在一個小時內完成。因爲在lintcode 上做過大量類似題目,所以只花了半個小時就完成了這套測

原创 Lintcode94 Binary Tree Maximum Path Sum solution 題解

【題目描述】給出一棵二叉樹,尋找一條路徑使其路徑和最大,路徑可以在任一節點中開始和結束(路徑和爲兩個節點之間所在路徑上的節點權值之和)。Given a binary tree, find the maximum path sum.The p