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

SIG计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(12)
OOD(0)
Algorithm(6)
System Design(1)
高频题(0)
Math(5)
全部(12)
OOD(0)
Algorithm(6)
System Design(1)
高频题(0)
Math(5)
1.Frog Jumping Grid Problem
2.Weight of a Balance Problem
3.Find Longest Contiguous Subarray Within Latency Threshold
4.Sort Matrix Leftmost Column by Bouncing Diagonal Weights
5.Determine the Bucket with the Largest Number of Files
6.Probability of Picking the Most Athletic Cat
7.Simulate Gravity on a 2D Field
8.Design a Grid-Based Block Drawing Algorithm
9.Geographic Question in VO Round
10.Expected Arc Length and Euclidean Distance on a Circle
11.Counting Sets with Odd Blocks
12.Counting Sets with Odd Blocks
1. Frog Jumping Grid Problem
Given a grid where a frog wants to jump from the starting position (0,0) to the destination (7,4), and the frog can only jump one square to the right or one square up at a time, how many different paths can the frog take if it is not willing to jump in the same direction (either right or up) three times consecutively? Describe your approach to solving this problem and provide the final answer.
2. Weight of a Balance Problem
Compute the weight of the green triangle in pounds if the following system is balanced and weighs 96 pounds in total. You are given a balanced system with various shapes including triangles, pentagons, and circles with certain relationships between their weights. You need to find the weight of the green triangle.
3. Find Longest Contiguous Subarray Within Latency Threshold
In a network monitoring system, maintaining consistent latency is crucial for optimal performance. Given an array of integers 'latencies', each representing recorded latencies in milliseconds, and a positive integer 'threshold', determine the maximum length of a contiguous subarray such that the difference between the maximum and minimum latencies within this subarray does not exceed the threshold. Return the length of the longest such contiguous subarray.
4. Sort Matrix Leftmost Column by Bouncing Diagonal Weights
You're given a square matrix of integers of size n × n. Define a bouncing diagonal as a sequence starting from a cell in the leftmost column and continuing diagonally up-right until it reaches the rightmost column, bouncing vertically if it reaches the top of the matrix. For each cell in the leftmost column, define its weight as the sum of the elements in the bouncing diagonals starting from that cell. Your task is to sort the elements of the leftmost column by their weights in ascending order, and in case of a tie, by their values in ascending order. Return the sorted values of the leftmost column as a single array. The solution should have a time complexity not worse than O(n2).
5. Determine the Bucket with the Largest Number of Files
Suppose you are logged in to some virtual environment, where just two types of commands can be executed: 'goto ' to move to the specified bucket, and 'create ' to create a new file in the current bucket. If a file with the same name already exists in the current bucket, the command does nothing. Your task is to process all provided commands and return the bucket name that contains the largest number of files at the end. It is guaranteed that there is no tie for the largest bucket name.