超强面试题

 

I) Computer operations (make the answer less than 4 lines for each question)

 

1. List troubleshooting steps if your Windows is unable to boot.   

 

2. A Windows PC takes 4 minutes to complete booting. What can be done to reduce the booting time to 1 minute?   

 

3. If a PC is installed Linux, describe steps to install Windows on the same PC and test it.  

II) Computer science (make the answer less than 4 lines for each question)

4. How to calculate the execution time of a simple instruction “a=3” without writing a program?  

III) Programming

5 How to write code to delete a specific node in a single link list (单链表)that takes O(1) time? That is, the time deleting a node is the same (independent from the length of the list.) Link list uses pointers,
not hash. Input is a pointer pointing to the deleted node. Show your algorithm with pseudo code. Hint: just 3 steps.
 

6 Class A generates random integers between -100 and 100 at a random frequency between 0 and 2 seconds. Class B decrements a counter when class A generated a negative integer and increments when class A generated a positive integer. Class B's counter needs to be updated in real time as class A generates numbers.

a) Show pseudo code in 3 cases:

1) A and B are in the same thread, 2) different threads,  

   c) different processes.

b) Bonus: Show different ways to handling each case.

 

IV) Design

7. A video software has 3 buttons: Play, Pause, Step Forward. Initially, only play button is visible. When user clicks play button, it starts to play video and only pause button is visible. Click pause, only play and step forward buttons are visible. Complete the state machine table below with 3 states: Play, Pause, Null.

State / Event

Click Play button

Click Pause button

Click Step Forward button

Init

   

Play

   

Pause

   

 

8. In a simple game, a ball is moving along a line from the left end toward the right end.

Show UML class diagram

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值