上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页
摘要: Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio 阅读全文
posted @ 2017-11-29 08:21 jasminemzy 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty. Example:Given bi 阅读全文
posted @ 2017-11-29 07:53 jasminemzy 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is equal to B's row number. Example: A = [ [ 1, 0, 0 阅读全文
posted @ 2017-11-29 05:02 jasminemzy 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2017-11-28 07:44 jasminemzy 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2017-11-27 04:41 jasminemzy 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it. Example Given -21->10->4->5, tail connects to node index 1, return true Given -21->10->4->5, t 阅读全文
posted @ 2017-11-19 13:02 jasminemzy 阅读(86) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy 阅读全文
posted @ 2017-11-19 05:38 jasminemzy 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then l 阅读全文
posted @ 2017-11-19 03:55 jasminemzy 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a function that takes an integer n and return all possib 阅读全文
posted @ 2017-11-17 04:34 jasminemzy 阅读(121) 评论(0) 推荐(0) 编辑
摘要: This is a follow up of Shortest Word Distance. The only difference is now word1 could be the same as word2. Given a list of words and two words word1  阅读全文
posted @ 2017-11-17 03:54 jasminemzy 阅读(173) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页