題目 Implement an iterator over a binary search tree (BST). Your iterator will be initial...
IP屬地:佛羅里達州
題目 Implement an iterator over a binary search tree (BST). Your iterator will be initial...
題目 Given an integer n, return the number of trailing zeroes in n!. Note: Your solution ...
題目 Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…...
題目 Sort a linked list in O(n log n) time using constant space complexity. 思路 用歸并排序 歸并排序...
題目 Sort a linked list using insertion sort. 思路 這道題花費了最多的時間。 復習了array的插入排序,用兩個循環(huán)實現(xiàn),每次循環(huán)到...
題目 Design a stack that supports push, pop, top, and retrieving the minimum element in c...
題目: There are N students in a class. Some of them are friends, while some are not. Thei...
題目 Given a non-empty string s and a dictionary wordDict containing a list of non-empty ...
題目: A linked list is given such that each node contains an additional random pointer wh...