摘要:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文
摘要:
先找到这个文件:/home/user/.xsession-errors打开这个文件。这个文件记录了系统启动的日志,从这里你就可以看到启动的时候哪里出了问题。对于我的来说,问题出在这里:"mkdtemp: private socket dir: Permission denied"于是发现原来是昨天动... 阅读全文
摘要:
Remove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6Return:1 --> 2 --> 3 --... 阅读全文
摘要:
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe... 阅读全文
摘要:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for binary tree * public class TreeN... 阅读全文
摘要:
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t... 阅读全文
摘要:
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl... 阅读全文
摘要:
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.用空间换时间的方法,先用一个数组将节点按序存放,然后建树,代码如下:/** * D... 阅读全文
摘要:
Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent ... 阅读全文