面经&感想

从6月初开始准备找工作,找了近半年,期间毁onsite无数,最近终于有所收获,拿到
几个offer,虽然不是那几个著名大公司,不能和版上的牛人比,但也算和自己专业相
近,决定挑一个从了。穷人没什么包子,就说点感想发点面经,答谢本版。顺便求祝福
接下来的process能够顺利。今年h1b已经用完了,我是打算quit phd做full time的,
学校的CPT/OPT没过qualify之前还不让full time,庆幸公司允许我先做part time。希
望一切能够顺利。也bless其他找工作的同志们。

1. 找工作还是要花大量时间精力充分准备的,各种基本概念、data structure,
algorithms, programming language concepts,还有自己简历上写的各种project要把
每个细节都弄清楚。没准备好之前不要轻易投大公司浪费机会,免得追悔莫及。我就有
惨痛的教训。一下是我主要复习的材料。
career cup
programming interview expose
ihas1337code
thecareerplus
geeks for geeks
thinking in java
C++ interview questions
Introduction to algorithms
编程之美
版上面经

2. 一定要坚信自己能找到一份工作,即使在最沮丧失落的时候,也要相信有一份适合
的工作在等自己。只要花时间肯努力,我周围没有听说谁努力找不到工作的,即使
background再弱,经验再少,技术再差,也能通过努力提高。很多时候不是自己不够好
,只是职位不适合而已。

3. 面试前要对公司的project了解一下,这样在聊的时候就有针对性,别人也会觉得你
有相关的知识和经验。就算某些方面不懂,也要尽量扯一些以前相关的经历,并表达自
己open to different roles的诚意。

4. 微笑,再微笑,且直视对方。微笑能缓解很多问题答不上来的尴尬,也显示你的自
信和好的personality。很多时候性格比技术更重要。

就想到这么多,先写这些。下面是一些phone和onsite被问到的问题,我把他们整理成3
个部分,有一些重复的,也有一些本版没见过的,或者和OS system相关的,仅供参考
。公司名就不一一列了,有A M G,一些system相关的公司和一般的software company。

Basic concepts:
1. what’s link list, array, hashtable, search/create time complexity
2. How to implement a hashtable, how to solve collision problems
3. The difference between List, Set, and Map in Java
4. Interface, abstract class


Coding:
1. Find duplicate elements in two arrays

2. Determine what a system is big- or little- endian

3. reverse a string

4. Design a timing mechanism: when a packet is received, cancel the timing; 
otherwise, start timing until time out. Suppose each timing object has 
different expiration period?

5. Given an integer, print out its square root

6. An integer array of size m + 1 with m unique element, find the duplicate 
one

7. Given a function to read/write data from/to hard disk. Req(r/w, addr, 
size, buffer), e.g.Read_write(read, 0, 5, …), Read_write(read, 5, 3, …). 
This function will be called thousand times. Consolidate the I/O requests 
and printout to one.
“read command, start from address 0, access 8 sectors.”

8. 输入一串整数数列, 求里面连续的可构成等差数列的sub-array的个数(>=3)
e.g. [1, 2, 3, 5, 7, 9, 8, 7];
output should be : 5
[1, 2, 3] [3, 5, 7] [3, 5, 7, 9][5, 7, 9] [9, 8, 7]
Time complexity O(n), space complexity O(1)

9. Print a two dimensional array clockwise

10. N*M grid, walk from (0,0) to (n, m), either 'right' or 'down', return 
the number of possible paths; There might be some obstacles in the grid.

11. Two integers n & m represented as two arrays, return n*m in terms of one
array

12. An array(0, 2, 1, 0, 2, 1, ...), only three different values, sort in 
place 

13. Print all combinations of an input array, if there are duplicates, e.g. 
(1, 2, 2, 3), output: 1, 12, 122, 123, 1223, …

14. Count the palindrome in a string

15. Given two XML, check whether they are equivalent

16. Career cup: 19.6, print the English phrase of an integer

17. Describe a data structure to store a tree node, if a tree node has a 
pointer to the sibling, write a function to update the sibling (level-order 
traverse)

18. Mth to the last node in a link list  (be careful about m & m-1)

19. Design a calculator: overflow, -error-, function test

20. Atoi

21. Write a singleton pattern

22. Find overlap between two sets of pairs

23. 1TB file that can not fit into memory, how to rotate the lines randomly 
and write to a new file? How to deal with it in distributed systems? How to 
detect one node's failure?

24. runlength encoded: [number of next elem in the array, the value of the 
elem]
2, 1, 3, 6, 1, 9 => 1, 1, 6, 6, 6, 9
Create a class and implement the following two methods:
getNext() 
hasNext() 

25. Determine whether two words are anagram, how to do pre-processing for a 
dictionary, so that it could do fast anagram searching

26. Suppose we can compare two arrays like:
{4,2,3} > {3,5,6}
{4,2,3} < {4,3,0}
In each move, you can only swap a number with its neighbor. Given an array 
and a number n, design an algorithm to make this array minimum using n moves.

27. Find the second largest number in an array

28. Design a restaurant booking system


System related:
1. what is race condition
2. what is deadlock, how to detect deadlock
3. what’s kmalloc
4. what happens when an application generates a request, what happen to 
system call, why using system call, how data transfers between user and 
kernel level
5. process vs. threads, address space, etc
6. How a process is created, how to do mapping between virtual address and 
physical memory
7. heap vs. stack
8. condition variable 
9. what's the data flow from OS -> device
10. how to detect memory leak
11. single writer, multi-reader lock problem
12. How linux command 'ls' works
13. spin_lock, mutex, semaphore
14. POSIX interface: sockets mode(blocking vs. nonblocking)
15. The cause of segmentation fault
基于可靠性评估序贯蒙特卡洛模拟法的配电网可靠性评估研究(Matlab代码实现)内容概要:本文围绕&ldquo;基于可靠性评估序贯蒙特卡洛模拟法的配电网可靠性评估研究&rdquo;,介绍了利用Matlab代码实现配电网可靠性的仿真分析方法。重点采用序贯蒙特卡洛模拟法对配电网进行长时间段的状态抽样与统计,通过模拟系统元件的故障与修复过程,评估配电网的关键可靠性指标,如系统停电频率、停电持续时间、负荷点可靠性等。该方法能够有效处理复杂网络结构与设备时序特性,提升评估精度,适用于含分布式电源、电动汽车等新型负荷接入的现代配电网。文中提供了完整的Matlab实现代码与案例分析,便于复现和扩展应用。; 适合人群:具备电力系统基础知识和Matlab编程能力的高校研究生、科研人员及电力行业技术人员,尤其适合从事配电网规划、运行与可靠性分析相关工作的人员; 使用场景及目标:①掌握序贯蒙特卡洛模拟法在电力系统可靠性评估中的基本原理与实现流程;②学习如何通过Matlab构建配电网仿真模型并进行状态转移模拟;③应用于含新能源接入的复杂配电网可靠性定量评估与优化设计; 阅读建议:建议结合文中提供的Matlab代码逐段调试运行,理解状态抽样、故障判断、修复逻辑及指标统计的具体实现方式,同时可扩展至不同网络结构或加入更多不确定性因素进行深化研究。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值