Twosigma计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(36)
OOD(2)
Algorithm(19)
System Design(3)
高频题(0)
Math(1)
全部(36)
OOD(2)
Algorithm(19)
System Design(3)
高频题(0)
Math(1)
1.Maze
2.leetcode1135
3.股票拍卖
4.树状流量切分
5.Word Search II
6.Kth Smallest Element in a Sorted Matrix
7.Merge Strings Alternately
8.Convert 1D Array Into 2D Array
9.找到所有的subString
10.股票竞价问题
11.Designing a Simple HashMap in Java
12.Calculating Fibonacci Numbers Algorithm
13.Binary Tree Serialization and Deserialization Algorithm
14.Design a Random Number Generator
15.Optimizing Time Complexity for Substring Finding
16.Missing Words Function
17.File Distribution to Data Centers
18.Sort a List of Strings Containing Numbers and Words
19.Finding Missing Numbers in a Large List
20.Sorting an Almost Sorted (K-Sorted) Array
21.Searching a Matrix Sorted in Rows and Columns
22.Maximum Element in Array with Minimum Comparisons
23.Design a Dynamic Array Allocation System
24.Complex Problem Involving Binary Search, DP, and Shortest Path
25.NP-Hard Graph Problem
26.Complex DFS Implementation
27.Matrix Depth-First Search (DFS) for Shortest Path
28.Write a Random Number Generator with Unique Outputs
29.Computer Science Concepts
30.Implement the n-th term of the Fibonacci sequence
31.String Format Sum Calculation
32.Triangle Tree Special Node Finder
33.Pirate Hat Riddle for Maximizing Probability of Release
34.__new__ vs __init__ in Python
35.Python Set Object Storage
36.Mathematical Proof that Pi is Not an Integer
1. Maze
给你一个String 代表一个Maze,还有一个word list。要做的事情就是traverse这个maze然后找到word list里边有的单词,最后要把这些找到的单词放在一个list里边返回。结果需要是sorted order,并且不能有重复。
2. leetcode1135
https://leetcode.com/problems/connecting-cities-with-minimum-cost/
3. 股票拍卖
有n份股票,有k个bid,bid里包括userId, price, quantity, timestamp。bid分发要求从价格高的开始,同价格的按照timestamp从小的开始每人发一份,如果股票够多就再发一轮,直到股票发完,或者所有bid都满足。要求返回一份股票都没有领到的userId,按照从小到大排序。
4. 树状流量切分
给了两个等长的list,一个是parent,一个是size。对于第i个,parent表示父节点的index,size表示净流入的流量大小。一个节点的总流量是自己的净流入量和所有子节点的流量的综合。要求把这个树分成两个树,让两个树的总流量的差值最小。返回最小差值。
5. Word Search II
Given an m x n board of characters and a list of strings words, return all words on the board.
Each word must be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word.