上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 76 下一页
摘要: Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) can search a literal word or a r 阅读全文
posted @ 2020-05-16 09:56 Schwifty 阅读(133) 评论(0) 推荐(0)
摘要: Given a circular array C of integers represented by A, find the maximum possible sum of a non-empty subarray of C. Here, a circular array means the en 阅读全文
posted @ 2020-05-16 05:17 Schwifty 阅读(179) 评论(0) 推荐(0)
摘要: Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, 阅读全文
posted @ 2020-05-15 08:57 Schwifty 阅读(108) 评论(0) 推荐(0)
摘要: Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we tak 阅读全文
posted @ 2020-05-15 08:39 Schwifty 阅读(102) 评论(0) 推荐(0)
摘要: Implement a trie with insert, search, and startsWith methods. Example: Trie trie = new Trie(); trie.insert("apple"); trie.search("apple"); // returns 阅读全文
posted @ 2020-05-15 01:26 Schwifty 阅读(151) 评论(0) 推荐(0)
摘要: Share Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appe 阅读全文
posted @ 2020-05-14 10:20 Schwifty 阅读(126) 评论(0) 推荐(0)
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2020-05-14 09:45 Schwifty 阅读(154) 评论(0) 推荐(0)
摘要: Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The l 阅读全文
posted @ 2020-05-14 06:07 Schwifty 阅读(169) 评论(0) 推荐(0)
摘要: Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 阅读全文
posted @ 2020-05-13 11:52 Schwifty 阅读(127) 评论(0) 推荐(0)
摘要: Given a function f(x, y) and a value z, return all positive integer pairs x and y where f(x,y) == z. The function is constantly increasing, i.e.: f(x, 阅读全文
posted @ 2020-05-13 11:43 Schwifty 阅读(222) 评论(0) 推荐(0)
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 76 下一页