随笔分类 - algorithm
摘要:Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o
阅读全文
摘要:Inorder Successor in Binary Search Tree 2.8 In Binary Tree, Inorder successor of a node is the next node in Inorder traversal of the Binary Tree. Inor
阅读全文
摘要:Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati
阅读全文
摘要:Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati
阅读全文
摘要:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note:
阅读全文
摘要:2017(10-12月) 码农类 博士 全职@Facebook - 猎头 - Onsite |Fail在职跳槽1. 1。 Laoyin. Validate BST. Regex matching。烙印给完题都举好多个例子,有拖延时间的嫌疑。regex那题本人做过但做不到秒杀,烙印非要我解释清楚再写c
阅读全文
摘要:Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... For example, given nums = [3, 5, 2, 1, 6, 4],
阅读全文
摘要:http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=309636&extra=page%3D1%26filter%3Dlastpost%26orderby%3Dlastpost%26sortid%3D311%26sortid%3D
阅读全文
摘要:/**Implement a synchronized fifo queue - storage and two operations (read/write)Read: Block until a value can be returned. (Optional Timeout). FIFO se
阅读全文
摘要:You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that a
阅读全文
摘要:You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee
阅读全文
摘要:Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words h
阅读全文
摘要:给一个list, 如何把里面的字符分配到尽量少的子list里,并且每个子list没有重复元素。比如['a','b','c','a','a','b'], 可以分成['a', 'b', 'c'], ['a', 'b'], ['a']['a', 'a', 'a', 'b', 'b', 'b'],可以分成[
阅读全文
摘要:https://www.evernote.com/shard/s424/sh/2804d7e0-c93c-455d-9b79-027caa1750c5/48c247d32264b0e5739c5fc27c7eaff1 电面, 第一轮 :Leetcode -> Game of life: 不需要in
阅读全文
摘要:Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.
阅读全文
摘要:Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including
阅读全文
摘要:Reverse a singly linked list.
阅读全文
摘要:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
阅读全文
摘要:Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1. For example, 123 -> "One Hundre
阅读全文
摘要:There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. Yo
阅读全文

浙公网安备 33010602011771号