摘要:
Given an array of n objects with k different colors (numbered from 1 to k), sort them so that objects of the same color are adjacent, with the colors 阅读全文
posted @ 2016-04-06 07:26
哥布林工程师
阅读(129)
评论(0)
推荐(0)
摘要:
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, 阅读全文
posted @ 2016-04-06 06:48
哥布林工程师
阅读(132)
评论(0)
推荐(0)
摘要:
Given 2*n + 2 numbers, every numbers occurs twice except two, find them. Example Given [1,2,2,3,4,4,5,3] return 1 and 5 Given [1,2,2,3,4,4,5,3] return 阅读全文
posted @ 2016-04-06 05:47
哥布林工程师
阅读(147)
评论(0)
推荐(0)
摘要:
Given 3*n + 1 numbers, every numbers occurs triple times except one, find it. Example Given [1,1,2,3,3,3,2,2,4,1] return 4 Given [1,1,2,3,3,3,2,2,4,1] 阅读全文
posted @ 2016-04-06 03:36
哥布林工程师
阅读(111)
评论(0)
推荐(0)
摘要:
Given an absolute path for a file (Unix-style), simplify it. Example "/home/", => "/home" "/a/./b/../../c/", => "/c" "/home/", => "/home" "/a/./b/../. 阅读全文
posted @ 2016-04-06 03:18
哥布林工程师
阅读(130)
评论(0)
推荐(0)
摘要:
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Example Given a matrix [ [1,2], [0,3] ], return[[0,2],[0 阅读全文
posted @ 2016-04-06 02:46
哥布林工程师
阅读(151)
评论(0)
推荐(0)

浙公网安备 33010602011771号