Coinbase计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(5)
OOD(1)
Algorithm(3)
System Design(1)
高频题(0)
Math(0)
全部(5)
OOD(1)
Algorithm(3)
System Design(1)
高频题(0)
Math(0)
1.Greedy Knapsack Problem
2.Process Garbled Logs
3.Transaction System with Rollback
4.Currency Exchange Rate Optimization
5.Interleave Iterator
1. Greedy Knapsack Problem
Solve the greedy knapsack problem where you must select items with given weights and values to maximize the total value in the knapsack without exceeding its weight capacity. Discuss your approach and its time and space complexity.
2. Process Garbled Logs
Given a set of garbled log texts, describe an approach to process and make sense of the data. What algorithms or data structures would you use to handle the garbled data efficiently?
3. Transaction System with Rollback
Design a transaction system that supports rollback functionality. Explain the data structures and algorithms you would use to ensure efficient transaction handling and rollback.
4. Currency Exchange Rate Optimization
Implement a system that finds the best currency exchange rate, potentially detecting currency exchange cycles that could be exploited for a profit. Describe the algorithm you would use and analyze its complexity.
5. Interleave Iterator
Design an interleave iterator that takes multiple iterators and interleaves their elements. For example, given iterators for lists [1,2,3] and [4,5], the interleave iterator should produce the sequence [1,4,2,5,3]. Explain how you would implement this and discuss the time and space complexity of your solution.