Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it t...
分类:
其他好文 时间:
2015-06-17 16:44:38
阅读次数:
126
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, all houses at this place are arranged in a ci...
分类:
其他好文 时间:
2015-06-17 09:44:34
阅读次数:
162
话说我们昨晚去看了侏罗纪公园,原来xd就是我最爱的巨幕,来美国这么多年了,怀念和小星星一路成长,一路看电影的经历,avatar是我们在美国一起看的第一部电影。老美看完好片子,还喜欢鼓个掌。这题one pass in place就是麻烦,要多做个string来判断单词要用到sb的insert,不过可以...
分类:
其他好文 时间:
2015-06-16 06:39:10
阅读次数:
123
descriptions:Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.注意是有序数组。。代码:if(num...
分类:
其他好文 时间:
2015-06-15 21:48:16
阅读次数:
116
Description:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra...
分类:
其他好文 时间:
2015-06-15 16:16:28
阅读次数:
128
Description:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?Code: 1...
分类:
其他好文 时间:
2015-06-14 10:53:39
阅读次数:
99
Description:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It...
分类:
其他好文 时间:
2015-06-14 09:21:24
阅读次数:
148
Given a binary tree, flatten it to a linked list in-place.For example,
Given 1
/ 2 5
/ \ 3 4 6The flattened tree should look like: 1
2...
分类:
其他好文 时间:
2015-06-13 14:19:28
阅读次数:
86
Note: This is an extension of House Robber.
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time...
分类:
其他好文 时间:
2015-06-13 12:54:22
阅读次数:
122
Otto Product Classification Winner's Interview: 2nd place, Alexander Guschin ¯\_(ツ)_/¯TheOtto Group Product Classification Challengemade Kaggle histor...