上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页
摘要: This is a follow up of Shortest Word Distance. The only difference is now you are given the list of words and your method will be called repeatedly ma 阅读全文
posted @ 2017-11-17 02:43 jasminemzy 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. For example,Assume that words = 阅读全文
posted @ 2017-11-16 14:49 jasminemzy 阅读(82) 评论(0) 推荐(0) 编辑
摘要: Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- w 阅读全文
posted @ 2017-11-16 10:12 jasminemzy 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- w 阅读全文
posted @ 2017-11-16 08:19 jasminemzy 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
posted @ 2017-11-16 07:22 jasminemzy 阅读(114) 评论(0) 推荐(0) 编辑
摘要: There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is different. Yo 阅读全文
posted @ 2017-11-16 06:48 jasminemzy 阅读(193) 评论(0) 推荐(0) 编辑
摘要: There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai 阅读全文
posted @ 2017-11-16 03:42 jasminemzy 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except  阅读全文
posted @ 2017-11-15 15:26 jasminemzy 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2017-11-15 14:41 jasminemzy 阅读(125) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2017-11-15 14:07 jasminemzy 阅读(75) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页