Google计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(189)
OOD(10)
Algorithm(160)
System Design(15)
高频题(5)
Math(0)
全部(189)
OOD(10)
Algorithm(160)
System Design(15)
高频题(5)
Math(0)
1.Course Schedule II
2.错位字符串
3.实现断点debugger
4.What will you take
5.Design a portal
6. building an app
7. the PM for a product
8.拓扑排序
9.Merge K Sorted Linked Lists
10.Design a simple spreadsheet
11.Generating All Permutations of a Distinct Integer Array
12.Course Schedule Feasibility Check
13.number of good pair
14.generate array list
15."Counting Visible People in Queue by Height"
16.Most Frequent Element Following Key in Array
17.Shortest Path in a Grid with Obstacle Elimination
18.Guess Color
19.捷豹跳跃组合
20.合并前缀树
21.实现一个统计功能
22.设计查询机票系统
23."Maximum Area of an Island in a Binary Matrix"
24.Conway's Game of Life Algorithm Challenge
25."Counting Subsequences in a String"
26.Valid Parentheses String Checker
27.employee report dictionary
28.查询子序列中的单词
29.find common subString
30.判断是否有一半元素大于mean
31.Rate Limited Logger Design
32.Alien Dictionary Language Order Problem
33.find the longest continuous "0"
34.设计一个翻译系统
35.填字游戏
36.计算传纸条到target坐标的概率
37.ip address validator
38.构建full binary tree
39.Validating UTF-8 Encoding in an Integer Array
40.Shortest Sequence of Instructions to Reach Target Position on Infinite Line
41.One Edit Distance String Comparison
42.Insert Interval and Merge Overlapping Intervals
43.Construct Quad-Tree from Binary Grid
44.Guess the Secret Word
45.Longest String Chain
46.valid contradiction
47.timestamp + string
48.设计WaitList系统
49.shortest path
50.remove floor
51.Calculating Fibonacci Numbers Algorithm
52.Range Sum Query - Mutable
53.Minimum Steps to Make Two Strings Anagrams
54.Design donation system
55.Find K Closest Elements in Sorted Array
56.Designing a MedianFinder Class for Data Streams
57.Construct Binary Tree from Parent-Child Descriptions
58.Longest Path with Distinct Characters in a Tree
59.Counting Connected Components in an Undirected Graph
60.file system
61.Shortest Path in a Grid with Obstacles Elimination
62.最短通行时间
63.Design a class organization
64.Closest Cafe for everyone
65.实现csv的parse功能
66.Similar pattern
67.套娃问题
68.Mutiplication of two big numbers
69.Delete node from forest
70.Maximum Score of a Node Sequence in an Undirected Graph
71.In-Memory FileSystem Simulator Design
72."Fraction to Recurring Decimal Conversion"
73.Set Matrix Zeroes
74.设计一个iterator
75.Determine if Largest Element is At Least Twice of Others
76.Continuous Subarray Sum Multiple of K
77.max sum of subMap
78.Finding Pairs with Minimum Absolute Difference in an Array
79.最短路径
80.Maze Generation Algorithm
81.设计一个Word store Service
82.找到最长递增string list
83.Find raw ingredient
84.判断胡牌
85.Data movement
86.设计一个NumContainer Class
87.Jump Game Problem
88.Wiggle Sort Algorithm
89.Binary Search in Sorted Array
90."Find Longest Word Built One Character at a Time from Dictionary"
91.Swim in Rising Water
92.Minimum flight cost
93.实现file system
94.Generate random questions
95.Time blocks
96.Determine Node Types in a Tree Structure Using SQL
97.Encode and comprees string
98.Minimize Stones in Piles with K Operations
99.Maximum Accepted Invitations in a Party
100.聊天记录文件
101.100%胜率的出牌顺序
102.中序遍历二叉搜素树
103.Finding the First Bad Version in a Software Release
104."Bulls and Cows Game Hint Generator"
105.Determine overlapping circles
106.Type a word in k distance
107.Predict the next word
108.Graph Valid Tree Checker
109.Log file
110.String editor
111.Longest subsequence
112.Shortest path
113.Add two list of string
114.寻找异位词
115.Logs printer
116.Win rate calculation
117.Word match
118.Fold full path
119.Stock price board
120.Passwords substrings
121.Robot moving
122.Finding the Number of Provinces in a Graph
123.Minimum Number of Intervals to Remove for Non-overlapping Intervals
124.Minimum Number of Jumps to Reach Last Index
125.Binary Tree Zigzag Level Order Traversal
126.Computing the H-Index from Citation Data
127.Trapping Rain Water Problem
128.Word Break Problem
129.Binary Search for Insert Position
130.Course Schedule II
131.Find largest along the tree path for all leaves
132.Count words
133.Transformer one input to another
134.Write random number generator
135.Random shuffle song
136.Check word edit distance
137.All words combination
138.Print path from one node to another
139.Find the setting with shortest time
140.Generate based on probability
141.Delete node and reconnect
142.Convert one word from another
143.Guess word game
144.Find count of each question
145.Print log messages
146.Lumber cutting
147.Prune employee tree
148.Find path
149.Check if a word is valid
150.All people know the story
151.Find substring
152.Check cards
153.Prepare dishes
154.Find anagram
155.Cook with ingredient
156.Buid character of length L
157.Employee importannce
158.Get status and count from data stream
159.Find basket counts
160.Pointwise sum
161.Design a riffle shuffle
162.Remove elements within distance
163.Check validity of input
164.Number of matching subsequences
165.Matching words
166.Break string 放到二叉树
167.Decide order of tasks
168.Atom and bond match
169.Find closest station
170.Convert matrix to all zeros
171.Broadcase message among routers
172.Join string to get palindrome
173.Put rings on rod
174.Count of Smaller Numbers After Self
175.Transmit signal
176.Deal with transaction
177.Generate similar string
178.Build tower
179.Design filesystem
180.Minimum Number of Perfect Squares to Sum to N
181.实现double linked list
182.邮箱数据导入
183.验证不等式
184.实现快进功能
185.Calculate the Moving Average Excluding the Top K Elements
186.Calculate the Size of a Directory
187.Minimum Size Set of Intervals
188.Interval Intersection
189.Code Formatting Method for Table List Generation
1. Course Schedule II
There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, bi] indicates that you must take course bi first if you want to take course ai.

For example, the pair [0, 1], indicates that to take course 0 you have to first take course 1.
Return the ordering of courses you should take to finish all courses. If there are many valid answers, return any of them. If it is impossible to finish all courses, return an empty array.
2. 错位字符串
两个字符串,如果第二个字符串的对应位置是第一个字符串对应位置的下一个字母,且每个位置
都如此,返回true,只要有一个不是就返回false,认为z的下一个是a
2.123123
3.·12
3. 实现断点debugger
想象debugger情景,你有很多行代码要debug,code length代表行数,breakpoint列表存了
一些排序好的数,其中数字不大于code length; 一个action列表,里面有next或者continue,想
象一个指针从第一行开始,next就往下走一行,continue就跳到下一个breakpoint,输出执行完
所有action这个指针的位置
4. What will you take
Part 1: You're PM of a videoconferencing app (before COVID). Run a customer satisfaction survey with 400k respondents and got results: 40% respond 2, 40% respond 4 (1-5 scale). How do you use this result?
Part 2: You're PM of this same videoconferencing app. You will participate in a conference in 9 months. You have to take one outstanding announcement to make public in the conference. What will you take?         
5. Design a portal
Design a portal (transporting people from any part of the world to another in an instant)