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

Palo Alto Networks计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(3)
OOD(1)
Algorithm(0)
System Design(2)
高频题(0)
Math(0)
全部(3)
OOD(1)
Algorithm(0)
System Design(2)
高频题(0)
Math(0)
1.LRU Cache Implementation
2.Implement a Poker Class
3.Design a report system
1. LRU Cache Implementation
Design and implement an LRU (Least Recently Used) cache. This cache should support the following operations: get and put. - get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1. - put(key, value) - Set or insert the value if the key is not already present. When the cache reached its capacity, it should invalidate the least recently used item before inserting a new item. Discuss the data structures you would use to implement this cache and explain why. Also, analyze the time complexity of each operation.
2. Implement a Poker Class
Design and implement a poker class with the following functionalities: 1. Distribute the remaining cards to 'n' players (e.g., if there are 17 cards and 5 players, each player gets 3 cards and 2 cards remain). 2. Calculate which player currently holds the highest score based on the cards in hand.
3. Design a report system
Design a report system that generates log with some inputs, including considerations for the front end, backend, and performance.