摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm... 阅读全文
posted @ 2016-01-13 09:09 Hygeia 阅读(190) 评论(0) 推荐(0)
摘要: Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()... 阅读全文
posted @ 2016-01-13 04:10 Hygeia 阅读(134) 评论(0) 推荐(0)
摘要: There are a row ofnhouses, each house can be painted with one of thekcolors. The cost of painting each house with a certain color is different. You ha... 阅读全文
posted @ 2016-01-13 01:22 Hygeia 阅读(196) 评论(0) 推荐(0)
摘要: There is a fence with n posts, each post can be painted with one of the k colors.You have to paint all the posts such that no more than two adjacent f... 阅读全文
posted @ 2016-01-13 00:43 Hygeia 阅读(177) 评论(0) 推荐(0)