1. binary tree inorder traversal 不能用recursive写 (LC原题)
2. 比如有个数组F={1,3, 4, 5, 2, 0}, A=3, 那么F[A]=5, F[F[A]]=0, F[F[F[A]]]=1....这样下去求第N个数是多少. from: 1point3acres.com/bbs 
3. first missing positive(LC原题)
4. 不用写代码,问得hashmap和hashcode的知识

1.Round Robin
一个处理器要处理一堆request,一次只能处理一条,每次执行一个任务最多执行时间q,接着执行等待着的下一个任务。若前一个任务没执行完则放到队尾,等待下一次执行
假设只要有任务开始以后cpu是不会空闲的,也就是说cpu开始后如果空闲了就说明没有任务了,另外Robin Round最后返回值是float
    public static float waitingTimeRobin(int[] arrival,int[] run, int q)
 
2.Rotate Matrix (
    把一个m*n的矩阵旋转90度,给一个flag规定是向左转还是向右转
. 1point3acres.com/bbs
3.Binary search tree minimum sum from root to leaf
    跟BST没啥关系,不要看到BST就以为是最左边的路径之和(左边路径可以很长,右边路径可以很短),用递归做很简单
 
4.insert into cycle linked list
    插入一个新的节点到一个sorted cycle linkedlist,返回新的节点。给的list节点不一定是最小节点
 
5.Greatest Common Divisor
    就是给一个数组找这些数的最大公约数
 
6.Shorted job first
    一个处理器要处理一堆request,一次只能处理一条,如果它有几个积压着的requests,它会先执行持续时间短的那个;对于持续时间相等的requests,先执行最早到达处理器的request。问平均每个request要等多久才能被处理。input:requestTimes[],每个request到达处理器的时间; durations[] 每个request要处理的持续时间。 两个数组是一一对应的,并已按requestTimes[] 从小到大排序过
    public double CalWaitingTime(int requestTimes[], int[] durations[]){}
    用priorityqueue做,地里有一个两层循环的答案,没仔细看,做完round robin以后发现思路很相似。注意用priorityqueue写comparator的时候,要先判断两者的execute time,如果execute time相同,则返回arrival time之差,即先按执行时间排序,若执行时间相同则按到达的时间排。
 
7.Valid Parenthesis
    给你一个str,里面只有 '('和‘)’,让你数valid pairs一共有多少,如果不是valid就返回-1. (判断是不是valid的parenthesis string,不是的话返回-1,是的话返回valid pair个数,即String.length() / 2 )
 
8.LRU Cache count miss
    实现以下LRU Cache再判断啥时候miss就好了,返回miss数。建议看看用LinkedHashMap实现lru cache, 代码很简洁。
 
9.Day chang(cell growth)
    int[] dayChange(int[] cells, int days), cells 数组,有8个元素,每天的变化情况是 当前位置 cell == (cell[i - 1] == cell[i + 1]) ? 0 : 1, 左右相等,当前位置为0, 不等为1, 默认 cells[0]左边 和 cells[cells.length - 1]右边的位置元素都是0, 求days天后的变化.
-google 1point3acres
10.Maze
    给个array,其中只有一格是9,其他格子是0或1,0表示此路不通,1表示可以走,判断从(0,0) 点开始上下左右移动能否找到这个是9的格子
 
11.subtree
 
12.sametree
    判断两棵树是否相同(结构和值)
.1point3acres缃�
另外,1. 若是用Java,用到queue, list啥的记得前面手动import java.util.*   2.所有函数都是static的,所以自己写其他helper函数的时候记得加上static

OA1的coding是two sum pair
                OA2的coding是Shortest Job First 和 循环链表插入元素

interview collect的更多相关文章

  1. UNIX command Questions Answers asked in Interview

    UNIX or Linux operating system has become default Server operating system and for whichever programm ...

  2. Cracking Digital VLSI Verification Interview 第四章

    目录 Hardware Description Languages Verilog SystemVerilog 对Cracking Digital VLSI Verification Intervie ...

  3. Pramp mock interview (4th practice): Matrix Spiral Print

    March 16, 2016 Problem statement:Given a 2D array (matrix) named M, print all items of M in a spiral ...

  4. WCF学习系列二---【WCF Interview Questions – Part 2 翻译系列】

    http://www.topwcftutorials.net/2012/09/wcf-faqs-part2.html WCF Interview Questions – Part 2 This WCF ...

  5. WCF学习系列一【WCF Interview Questions-Part 1 翻译系列】

    http://www.topwcftutorials.net/2012/08/wcf-faqs-part1.html WCF Interview Questions – Part 1 This WCF ...

  6. Amazon Interview | Set 27

    Amazon Interview | Set 27 Hi, I was recently interviewed for SDE1 position for Amazon and got select ...

  7. Java Swing interview

    http://www.careerride.com/Swing-AWT-Interview-Questions.aspx   Swing interview questions and answers ...

  8. Oracle forall bulk collect批量数据更新

    对于数据量较大的插入操作可采用此种方法操作,注意: limit减少内存占用,如果数据量较大一次性全部加载到内存中,对PGA来说压力太大,可采用limit的方法一次加载一定数量的数据,建议值通常为100 ...

  9. Pramp - mock interview experience

    Pramp - mock interview experience   February 23, 2016 Read the article today from hackerRank blog on ...

随机推荐

  1. Sending HTML Form Data

    public Task<HttpResponseMessage> PostFormData(){ // Check if the request contains multipart/fo ...

  2. 不管ACM是不是屠龙之技

    有一个目标,每天早上起床能让你保持斗志满满..找到自己的战场和归属. 这件事本身就是很难得的...是不是 ACM 并不重要. 你现在能从其他事情上获得这种体验么? -xiaodao

  3. 根据树父子ID拼接无限极树结构表的名称

    declare @c varchar(50)set @c='572a3d51-ef7a-459e-a5cd-ebf0fca51e8b' --能查出来呀 你试试,我试一下,好像可以啦谢谢 declare ...

  4. Oracle 归档路径

    Oracle 的归档路径设置,这里主要按照官网说明记录 LOG_ARCHIVE_DEST_n 与 LOG_ARCHIVE_DEST_STATE_n 这两个参数. 我使用的数据库是11.2版本,这两个参 ...

  5. mysql优化(3) 集群配置

    两台服务器 192.168.187.131 192.168.187.132 1.主从配置 131为主 132为从 在131下 vim /etc/my.cnf [mysqld] datadir=/var ...

  6. Node.js内置的工具和第三方模块来进行单步调试

    1.命令行调试: Node.js调试命令: run 执行脚本,在第一行暂停 restart 重新执行脚本 cont,c 继续执行,知道遇到下一个断点 next,n 单步执行 step,s 单步执行,并 ...

  7. c语言 文件写入和读取

    #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 10 struct studen ...

  8. TableViewController的添加,删除,移动

    #import "RootTableViewController.h" @interface RootTableViewController () { UITableViewCel ...

  9. VS2010 CLR20r3 devenv.exe 错误的解决--vs重启解决方案

    VS2010 CLR20r3 devenv.exe 错误的解决   最近我的vs2010经常过段时间就报CLR20r3错误的解决,出现这个异常我的vs2010就要重启,很是烦人,这么搞没法干活也. 搜 ...

  10. BuildSigar

    https://support.hyperic.com/display/SIGAR/Home;jsessionid=7436F86CA13B66BCE1A827043E159F34#Home-down ...