Startup / VO 面试真题解析:Components, Deadlock, Mutex, Singleton, 字符串与数字基础题

55次阅读
没有评论

What is deadlock? How do you avoid it?

Discuss class components of customer, orders, and discount related to customer order history and order content.

What is a mutex?

Write a singleton, how to and when to use singleton.

Reverse a number without using a temp variable.

Write a program and check if a number is a rotation complement of another.

Write a program to reverse words in a string.

这组题目覆盖了并发基础、面向对象设计和几个常见编程小题:需要理解死锁的成因与规避方法,区分 mutex 的作用,并能说明 singleton 的实现方式和适用场景;在设计题中,要围绕 customer、orders、discount 这些核心实体建立清晰的类关系,体现订单历史与订单内容的建模能力;在算法题中,则考察原地反转数字、判断数字旋转关系,以及按单词反转字符串等基础字符串处理技巧。整体偏向面试中的综合基础题,重点是思路清晰、边界情况完整、实现简洁。

正文完
 0