Fork me on GitHub
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页
摘要: Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example:Given num = 16, return true. Given num = 5, return fa 阅读全文
posted @ 2017-10-21 22:58 hellowOOOrld 阅读(166) 评论(0) 推荐(0)
摘要: 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-10-20 21:26 hellowOOOrld 阅读(206) 评论(0) 推荐(0)
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2017-10-16 22:33 hellowOOOrld 阅读(123) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2017-10-16 21:01 hellowOOOrld 阅读(151) 评论(0) 推荐(0)
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 - 阅读全文
posted @ 2017-10-16 10:56 hellowOOOrld 阅读(109) 评论(0) 推荐(0)
摘要: Given an encoded string, return it's decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is b 阅读全文
posted @ 2017-10-11 15:31 hellowOOOrld 阅读(153) 评论(0) 推荐(0)
摘要: Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. Example 1: Input: 5 O 阅读全文
posted @ 2017-10-08 22:06 hellowOOOrld 阅读(175) 评论(0) 推荐(0)
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2017-10-08 11:03 hellowOOOrld 阅读(697) 评论(0) 推荐(0)
摘要: You are given a data structure of employee information, which includes the employee's unique id, his importance value and his directsubordinates' id. 阅读全文
posted @ 2017-10-08 00:23 hellowOOOrld 阅读(400) 评论(0) 推荐(0)
摘要: Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the roo 阅读全文
posted @ 2017-10-07 23:06 hellowOOOrld 阅读(525) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页