TikTok计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(14)
OOD(0)
Algorithm(6)
System Design(1)
高频题(0)
Math(0)
全部(14)
OOD(0)
Algorithm(6)
System Design(1)
高频题(0)
Math(0)
1.Count Square Submatrices with All Ones
2.Palindrome Number
3.Processing tasks
4.Longest Increasing Path in a Matrix
5.Maximum Swap
6.Generate Parentheses
7.Binary Search Tree Iterator
8.设计一个查看商品历史价格的服务
9.number of paths
10.permutation
11.Bipartite Graph Validation
12.Longest String Chain
13.Counting Substrings with Equal Number of Continuous Ones and Zeros
14.Longest Increasing Subsequence Length in an Integer Array
1. Count Square Submatrices with All Ones
Given a m * n matrix of ones and zeros, return how many square submatrices have all ones.
2. Palindrome Number
Given an integer x, return true if x is a palindrome, and false otherwise.
3. Processing tasks
There is a task recorded in the two-dimensional array tasks in the format [start, end, period], indicating that the task needs to be completed within the time range start to end, and period indicates the length of time required to complete the task. Note:1. The period can be discontinuous time.
2. The start and end are included.
3. The computer can handle an unlimited number of tasks at the same time.
Please calculate the minimum time that the computer can process all the tasks.
4. Longest Increasing Path in a Matrix
Given an m x n integers matrix, return the length of the longest increasing path in matrix.
From each cell, you can either move in four directions: left, right, up, or down. You may not move diagonally or move outside the boundary (i.e., wrap-around is not allowed).
5. Maximum Swap
You are given an integer num. You can swap two digits at most once to get the maximum valued number.
Return the maximum valued number you can get.