随笔分类 -  algorithm

1 2 3 4 5 ··· 13 下一页
摘要:Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o 阅读全文
posted @ 2018-02-14 04:51 逸朵 阅读(163) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-02-14 02:08 逸朵 阅读(220) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-02-14 01:52 逸朵 阅读(322) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-02-13 12:18 逸朵 阅读(142) 评论(0) 推荐(0)
摘要:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: 阅读全文
posted @ 2018-02-11 09:31 逸朵 阅读(131) 评论(0) 推荐(0)
摘要:2017(10-12月) 码农类 博士 全职@Facebook - 猎头 - Onsite |Fail在职跳槽1. 1。 Laoyin. Validate BST. Regex matching。烙印给完题都举好多个例子,有拖延时间的嫌疑。regex那题本人做过但做不到秒杀,烙印非要我解释清楚再写c 阅读全文
posted @ 2018-02-11 09:29 逸朵 阅读(4807) 评论(0) 推荐(0)
摘要: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], 阅读全文
posted @ 2018-02-11 08:49 逸朵 阅读(130) 评论(0) 推荐(0)
摘要:http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=309636&extra=page%3D1%26filter%3Dlastpost%26orderby%3Dlastpost%26sortid%3D311%26sortid%3D 阅读全文
posted @ 2018-02-09 01:53 逸朵 阅读(683) 评论(0) 推荐(0)
摘要:/**Implement a synchronized fifo queue - storage and two operations (read/write)Read: Block until a value can be returned. (Optional Timeout). FIFO se 阅读全文
posted @ 2018-02-06 05:37 逸朵 阅读(125) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-02-05 08:41 逸朵 阅读(99) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-02-05 08:16 逸朵 阅读(238) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-02-04 13:28 逸朵 阅读(160) 评论(0) 推荐(0)
摘要:给一个list, 如何把里面的字符分配到尽量少的子list里,并且每个子list没有重复元素。比如['a','b','c','a','a','b'], 可以分成['a', 'b', 'c'], ['a', 'b'], ['a']['a', 'a', 'a', 'b', 'b', 'b'],可以分成[ 阅读全文
posted @ 2018-02-04 13:27 逸朵 阅读(1186) 评论(0) 推荐(0)
摘要:https://www.evernote.com/shard/s424/sh/2804d7e0-c93c-455d-9b79-027caa1750c5/48c247d32264b0e5739c5fc27c7eaff1 电面, 第一轮 :Leetcode -> Game of life: 不需要in 阅读全文
posted @ 2018-02-04 08:10 逸朵 阅读(3546) 评论(0) 推荐(0)
摘要: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. 阅读全文
posted @ 2018-02-01 10:49 逸朵 阅读(113) 评论(0) 推荐(0)
摘要:Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including 阅读全文
posted @ 2018-01-31 12:08 逸朵 阅读(102) 评论(0) 推荐(0)
摘要:Reverse a singly linked list. 阅读全文
posted @ 2018-01-31 10:40 逸朵 阅读(107) 评论(0) 推荐(0)
摘要:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 阅读全文
posted @ 2018-01-31 04:52 逸朵 阅读(124) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-01-31 02:03 逸朵 阅读(124) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-01-30 13:10 逸朵 阅读(150) 评论(0) 推荐(0)

1 2 3 4 5 ··· 13 下一页