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

IMC计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(5)
OOD(0)
Algorithm(4)
System Design(1)
高频题(0)
Math(0)
全部(5)
OOD(0)
Algorithm(4)
System Design(1)
高频题(0)
Math(0)
1.Optimizing Bank Transfer Records
2.Order of Operations by Speed
3.Worst Case Complexity Analysis
4.Stack Implementation with Special Features
5.Depth-First Search and Binary Search Problem
1. Optimizing Bank Transfer Records
You are given a 100MB XML file containing bank transfer records between 10 bank accounts with various stock codes. Each account performs a large number of transactions, such as Account A buying 1 share of 'abc' stock from Account B, and Account B selling 0.5 shares of 'efg' stock to Account C. Each transaction incurs a fee. Your task is to simplify the number of transfers by offsetting transactions where possible, such as between Accounts A and B, to generate a record with as few transfers as possible while ensuring that the final number of shares in each of the 10 accounts remains consistent with the initial state. You must use Python to solve this problem and provide a detailed README explaining the choice of libraries used and test cases.
2. Order of Operations by Speed
What is the fastest to slowest order of the following operations? a. read CPU cache b. addition of two numbers c. read from memory. d. read from disk e. heap memory allocation.
3. Worst Case Complexity Analysis
What is the worst case complexity of the following operations: a. find the index of an element. b. delete the back of a dynamic array like std::vector. c. find the smallest element in a balanced binary search tree d. insert an element to a sorted linked list.
4. Stack Implementation with Special Features
Implement a stack with special features similar to LC1381. The implementation should avoid brute-force approaches for 'remove_lower' or 'remove_upper' operations to prevent timeout errors (TLE).
5. Depth-First Search and Binary Search Problem
The question involves using depth-first search (DFS) and binary search to find the maximum height of water in a river such that you can still cross the river using stones of different heights in the water.