<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KVGHS6G" height="0" width="0" style="display:none;visibility:hidden"></iframe>

Twitter计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(47)
OOD(0)
Algorithm(9)
System Design(3)
高频题(0)
Math(0)
全部(47)
OOD(0)
Algorithm(9)
System Design(3)
高频题(0)
Math(0)
1.leetcode 152
2.K-diff Pairs in an Array
3.Palindromic Substrings
4.Design Add and Search Words Data Structure
5.Merge Intervals
6.leetcode 1348
7.leetcode 1817
8.leetcode 528
9.leetcode 212
10.PathFinder
11.TreeTimeCalc
12.Merge k Sorted Lists
13.leetcode 438
14.气球最大体积问题
15.Maximum Visibility
16.leetcode 652
17.leetcode 372
18.leetcode 435
19.leetcode 196
20.leetcode 1348
21.leetcode 532
22.leetcode 647
23.Random Pick with Weight
24.leetcode 211
25.design hashmap
26.Finding the Users Active Minutes
27.Tweet Counts Per Frequency
28.Word Search II
29.Maximum Product Subarray
30.Find All Anagrams in a String
31.Find Duplicate Subtrees
32.Non-overlapping Intervals
33.Super Pow
34.Finding the Users Active Minutes
35.Merge Two Sorted Lists
36.Tweet Counts Per Frequency
37.Text Justification Algorithm
38.Counting K-diff Pairs in an Array
39.Word Search II
40.Word Search in 2D Grid
41.Find log in given timestamp
42.Restocking the warehouse
43."Merge Overlapping Intervals"
44.Return usernames with a prefix
45.Determine Symmetrical Vertical Line in 2D Points
46.Implement a hashmap
47.Design Encoding and Decoding APIs
1. leetcode 152
leetcode 152
2. K-diff Pairs in an Array
Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array.
A k-diff pair is an integer pair (nums[i], nums[j]), where the following are true:
0 <= i, j < nums.length
i != j
nums[i] - nums[j] == k
Notice that |val| denotes the absolute value of val.
3. Palindromic Substrings
Given a string s, return the number of palindromic substrings in it.
A string is a palindrome when it reads the same backward as forward.
A substring is a contiguous sequence of characters within the string.
4. Design Add and Search Words Data Structure
Design a data structure that supports adding new words and finding if a string matches any previously added string.
Implement the WordDictionary class:
WordDictionary() Initializes the object.
void addWord(word) Adds word to the data structure, it can be matched later.
bool search(word) Returns true if there is any string in the data structure that matches word or false otherwise. word may contain dots '.' where dots can be matched with any letter.
5. Merge Intervals
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.