1. 给你一个棋盘 int[][] board, 你可以交换任何一个棋子和它的邻居(横向或者竖向相邻的棋子),如果交换后,在横向或者竖向产生了大于等于三个连续的一样的棋子 e.g. 4 4 4
5
5
5
那么就算交换有效。(就是一个比较常见的游戏,忘记叫啥名字了)
请你写一个函数返回所有可以有效交换的棋子的坐标对。 比如 ((0, 0), (1, 0)) , ((3,2),(3,3)).
2,看code,debug, 然后写出正确的code,这个没啥说的
3 Merge interval
Running Median : follow up: O(1) space
2,
write a fuction to titlecase a string
for example
input: the quick brown fox
output: The Quick Brown Fox
two pointers, remember to update flag
Read full article from Palantir面经 | shawnlincoding
No comments:
Post a Comment