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

Confluent计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(14)
OOD(1)
Algorithm(4)
System Design(6)
高频题(0)
Math(0)
全部(14)
OOD(1)
Algorithm(4)
System Design(6)
高频题(0)
Math(0)
1.Implement Functions Registration and Matching
2.Implement a Delay Scheduler Using Heap and Timer-Lock
3.Design a Sharded TinyURL Service with DNS Considerations
4.Implement Data Structures to Get, Put, and Retrieve Averages in O(1)
5.Design a KV store with WAL, Snapshot, and Recovery
6.Design a News Feed System
7.Time Window Map Problem
8.Design a TinyURL System
9.Valid Sudoku and Solve Sudoku
10.Design a system to search for a word or a phrase in a document
11.Implement a function similar to the Unix 'tail -n' command
12.Design a TinyURL System
13.Concurrency Problem Involving Document IDs
14.Implement a 'tail -n' Command
1. Implement Functions Registration and Matching
Implement two functions for a system that registers and finds matching functions based on their arguments. The first function, 'register', should accept a list of 'Function' objects, each with a 'name' and a list of 'args'. The second function, 'findMatch', should return all functions that match a given list of arguments. For example, if 'Function* A' is registered with 'Integer' as its argument, calling 'findMatch' with 'Integer' should return 'A'. If 'Function* B' and 'Function* C' are registered with 'Integer' and 'Boolean', calling 'findMatch' with 'Integer' and 'Boolean' should return 'B' and 'C'. Additionally, implement support for variadic functions indicated by a 'bool isCard' property. If 'Function* A' is variadic, calling 'findMatch' with any number of 'Integer' arguments should return 'A'.
2. Implement a Delay Scheduler Using Heap and Timer-Lock
Implement a DelayScheduler that schedules tasks to be executed after a certain delay. Use a heap data structure to manage the tasks and a timer-lock mechanism to handle the execution timing.
3. Design a Sharded TinyURL Service with DNS Considerations
Design a TinyURL service where each long URL can only be mapped to one short URL. Discuss how you would implement sharding and consider DNS in your design.
4. Implement Data Structures to Get, Put, and Retrieve Averages in O(1)
Implement data structures that support the following operations: 'get', 'put', and 'getAverage'. The 'get' operation retrieves the value associated with a key, 'put' inserts or updates the value for a key, and 'getAverage' calculates the average of all values. All operations should be performed in O(1) time complexity.
5. Design a KV store with WAL, Snapshot, and Recovery
Design a key-value store system on a single machine. Explain how you would implement write-ahead logging (WAL), snapshotting, and recovery mechanisms.