上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页

2014年2月19日

amazon 面经

摘要: (1)聊聊平时用到的基本数据结构,各有什么优劣,以及什么时候该用哪个数据结构;(2)聊一个自己成功的research project。着重谈谈这个project成功的几个关键步骤;(3)一个2D矩阵,每个单元都是一个字符。相邻字符可以连起来,这样就可以逐渐组成一个单词。(一个字符可以和周围8个方向的相邻字符连接)。但是在一个单词中,同一个位置只能经过一次。打印出所有合法单词,不重复。What is encapsulation?Ans) The encapsulation is achieved by combining the methods and attribute into a clas 阅读全文

posted @ 2014-02-19 15:24 brave_bo 阅读(1206) 评论(0) 推荐(0)

2014年2月18日

面向对象 定义

摘要: Method overriding, in object oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes.OOPS ConceptQ1) What is polymorphism?Ans)Polymorphismgives us the ulti 阅读全文

posted @ 2014-02-18 02:12 brave_bo 阅读(210) 评论(0) 推荐(0)

2014年2月17日

LRU

摘要: import java.util.*;/* * we are using linked list with hashmap for Lru.Reason behind this is ,since HashMap is able to store data and key but * how do we get info about least recently used cache value?. For this we need to keep track all inserted data into map * by using linked list. When inserting n 阅读全文

posted @ 2014-02-17 04:55 brave_bo 阅读(185) 评论(0) 推荐(0)

2014年2月16日

quick sort

摘要: import java.util.Comparator;import java.util.PriorityQueue;public class solution2 { public static void main(String[] args) { // TODO Auto-generated method stub int A[] = {3,4,6,3,5,33,8,6,4,3,2,1,4,0,3}; quickSort(A,0,A.length-1); for(int i : A){ System.out.... 阅读全文

posted @ 2014-02-16 16:54 brave_bo 阅读(135) 评论(0) 推荐(0)

quicksort liner find kth smallest or

摘要: Let's solve a problem with application of quick sort.Problem statementGiven an set of numbers in non-sorted order, find the Kth smallest element.Kth s... 阅读全文

posted @ 2014-02-16 15:27 brave_bo 阅读(312) 评论(0) 推荐(0)

comparator for String

摘要: import java.util.Comparator;import java.util.PriorityQueue;public class solution2 { /** * @param args */ @SuppressWarnings("unchecked") PriorityQueue queue = new PriorityQueue(2,new comparatorString()); public static void main(String[] args) { // TODO Auto-... 阅读全文

posted @ 2014-02-16 11:49 brave_bo 阅读(514) 评论(0) 推荐(0)

2014年2月12日

面试步骤

摘要: 热情洋溢。一边说一边写。怎么个配置,我负责什么,怎么协同工作.Could you be more specific about?this team is foucs on .... so ,what kind of technoly you often use in the team?what's the team struct in this team. how many PM and software developer. 阅读全文

posted @ 2014-02-12 01:38 brave_bo 阅读(136) 评论(0) 推荐(0)

2014年2月9日

abstract vs interface

摘要: Abstract classes can have constant, members, method and method implementations, whereas interfaces can only have may only containmethod signatureand constant declarations(both static and final)staticfinal.Methods and members of an abstract class can be defined with any visibility, whereas all method 阅读全文

posted @ 2014-02-09 05:11 brave_bo 阅读(185) 评论(0) 推荐(0)

2014年2月7日

面向对象设计 经验谈

摘要: /*面向对象设计把握一个重要的经验:谁拥有数据,谁就对外提供操作这些数据的方法 1.人在黑板上画圆 2.列车司机紧急刹车 3.售货员统计收获小票的金额 4.你把门关上了 5。球从一根绳子的一段移动到了另一端*/ 1.对于这个设计,上面有person , blackborad , circle三个对象, 动词 : 画。 因为画的动作的数据 x,y,randius 是circle拥有的数据,所以 draw()方法应该属于circle对象。。。而不是动作的发出者。。而发出者往往会委托动作承受者2。 司机发出的刹车动作会委托车本身来完成3。售货员统计小票的动作会委托小票来完成4。关门的动作会委托门.. 阅读全文

posted @ 2014-02-07 07:16 brave_bo 阅读(205) 评论(0) 推荐(0)

2014年1月28日

[LeetCode] Surrounded Regions, Solution

摘要: http://fisherlei.blogspot.com/search?q=Surrounded+Region特别说一下,里面实现bfs的code挺有意思的int k =0; 20: while(k<xIndex.size()) 21: { 22: int x = xIndex[k]; 23: int y = yIndex[k]; 24: visited[x*row +y] =1; 25: if(IsInBoundary(x, y, row, col)... 阅读全文

posted @ 2014-01-28 09:04 brave_bo 阅读(236) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页

导航