随笔分类 - 面试
难死人不偿命!苹果8大笔试题及答案
摘要:苹果公司在招聘员工时,会向求职者问一些“可汗学院”(Khan Academy)提出的考验智商的谜题。你可能没听说过“可汗学院”,但“可汗学院”的谜题被苹果采用一定是有其道理的。可汗学院由孟加拉裔美国人萨尔曼·可汗(Salman Kahan)创立,是一家由谷歌和比尔&梅琳达·盖茨基金会背后支持的教育性...
阅读全文
机器人走方格问题
摘要:package List;/** * Created by Administrator on 2015/10/10. *//** 地上有一个m行和n列的方格。一个机器人从坐标0,0的格子开始移动,* 每一次只能向左,右,上,下四个方向移动一格,但是不能进入行坐标和列坐标的数位之和大于k的格子。* 例...
阅读全文
一道数列的规律题(使用递归解决)
摘要:/** * Created by Administrator on 2015/10/10. *//** 1,1,2,3,5,8,13,21,....* 求解第30位数是多少* */public class demo1 { public static int compute(int n){ ...
阅读全文
反转单链表
摘要:ListNode是单链表节点的数据结构,实现见如下代码:package List;/** * Created by Administrator on 2015/10/10. */public class ListNode { //节点的值 private char data; //...
阅读全文
求一个二叉树的深度以及如何判断一个二叉树是一个平衡二叉树
摘要:/** * Created by Administrator on 2015/10/10. */public class TreeNode { //树节点的值 private char data; //节点的左子树 private TreeNode leftTree; ...
阅读全文
Ugly Number
摘要:import java.util.ArrayList;/** * Created by seven_hu on 2015/9/21. */public class Solution3 { /**Write a program to check whether a given number is...
阅读全文
移动0元素
摘要:/** * Created by seven_hu on 2015/9/21. *//**Given an array nums, write a function to move all 0's to the end of it while maintaining the relative ord...
阅读全文
从矩阵中查找一个数
摘要:/** * Created by seven_hu on 2015/8/31. *//** Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following...
阅读全文
Java面试
摘要:Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
阅读全文
浙公网安备 33010602011771号