1. 计算一个中缀表达式,包含加减乘除,没有括号,比如:“3 + 1 / 1 *2”,
return算式的结果
2. Leetcode 数字转罗马数字(简化:假设数字<=1000)
3. given rand1():能够产生random数字0,1。用rand1() 生成randN(){0,1,2,。。
。n}
http://www.mitbbs.com/article_t/JobHunting/32707947.html
1. 给定rand1():能够产生random数字0,1
用rand1()实现:
rand3()--> 0, 1, 2, 3
rand4()--> 0, 1, 2, 3, 4
randN(int n)--> 0, 1, ..., N n可以是任意整数,包括0、负整数、正整数
,注意edge case
2. given 一个字符串,这个字符串是一个算式,包含加减乘除,没有括号,符号和数
字之间以一个空格格开,比如:“1 + 2 * 4 / 5”,return算式的结果
3. given两个字符串,分别表示两个元素等和不等,比如:
arr1 = {“A=B”, "B=C", ...}
arr2 = {"A!=C", "F!=R", ...}
判断是否有矛盾,这个例子就有矛盾:A!=C
given提取元素的method: getID(..),这个不用自己写:String[] sarr = getID(arr1
[0]) --> sarr {A, B}
4. https://oj.leetcode.com/problems/regular-expression-matching/
5. considering a list of N numbers, return, if it exists, the number that occurs more than half the length of the list.
6.Implement an address book where you can access a contact in O(1) time, list contacts in alphabetical order in O(n) time, and get prefix results as you type a search query.
Web development questions
7.++ Onsite 1 ++
In a client/server scenario, serialize/de-serialize a balanced binary tree which is to be sent from the client to the server.
Linux system programming fundamentals including /proc filesystem, OOM killer
++ Onsite 2 ++
Linux system fundamentals - more /proc filesystem based questions
Structure of a binary (assuming ELF) on Linux.
Programmatically print the offset of a member inside a variable of struct type.
Virtual Memory fundamentals
++ Onsite 3 ++
Given a binary min heap, insert a new member.