上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 29 下一页
摘要: 题目: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. E 阅读全文
posted @ 2020-02-24 16:01 silentteller 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 题目: On an NxN chessboard, a knight starts at the r-th row and c-th column and attempts to make exactly K moves. The rows and columns are 0 indexed, so 阅读全文
posted @ 2020-02-23 19:57 silentteller 阅读(226) 评论(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 阅读全文
posted @ 2020-02-23 18:59 silentteller 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the 阅读全文
posted @ 2020-02-22 23:27 silentteller 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 题目: 一个花园有N个位置。每个位置上有一朵花。这N朵花会在N天内逐一盛开。每天都一定会有并且只有一朵花盛开,从这天起,这朵花将一直处于盛开的状态。 给定一个由数字1到N组成的数组flowers。数组中的每个数字表示那一天将会盛开的花的位置。 例如,flowers[i] = x表示在位置x上的花会在 阅读全文
posted @ 2020-02-22 20:40 silentteller 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 题目: You are given a data structure of employee information, which includes the employee's unique id, his importance value and his direct subordinates' 阅读全文
posted @ 2020-02-21 22:33 silentteller 阅读(361) 评论(1) 推荐(0) 编辑
摘要: 题目: In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes 阅读全文
posted @ 2020-02-21 21:45 silentteller 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 题目: Implement a trie with insert, search, and startsWith methods. Example: Trie trie = new Trie(); trie.insert("apple"); trie.search("apple"); // retu 阅读全文
posted @ 2020-02-21 20:16 silentteller 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, suc 阅读全文
posted @ 2020-02-20 23:58 silentteller 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWo 阅读全文
posted @ 2020-02-17 22:34 silentteller 阅读(466) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 29 下一页