笔试机试面试
文章平均质量分 54
chicc999
这个作者很懒,什么都没留下…
展开
-
【笔试机试】华为合集
1.请统计用下列9个整数前面用+、-这2个运算符号计算出1 2 3 4 5 6 7 8 9=5 有多少种方式解法一:/** * 华为机试 * @author cy * */public class huawei1 { public static void main(String[] args) { myUtil.test(5, 9); System.out.p原创 2013-10-18 19:27:32 · 1091 阅读 · 0 评论 -
【LeetCode】Single Number
Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using ext原创 2014-07-02 22:50:06 · 354 阅读 · 0 评论 -
【剑指offer合集】
3.二维数组的查找原创 2014-08-17 23:01:35 · 336 阅读 · 0 评论 -
【LeetCode】Linked List Cycle
判断是否是循环链表只需要用快慢指针,kanshifou原创 2014-08-13 21:24:56 · 372 阅读 · 0 评论 -
【LeetCode】Unique Binary Search Trees
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \原创 2014-08-09 16:49:36 · 289 阅读 · 0 评论 -
DP合集
1.一个100层的大厦,你手中有两个相同的玻璃球。从这个大厦的某一层扔下围棋子就会碎,用你手中的这两个玻璃围棋子,找出一个最优的策略,来得知那个临界层面原创 2014-05-20 18:56:19 · 1265 阅读 · 0 评论 -
【LeetCode】Best Time to Buy and Sell Stock II &&Integer to Roman
1.Best Time to Buy and Sell Stock II原创 2014-07-11 15:42:28 · 357 阅读 · 0 评论 -
【LeetCode】Merge k Sorted Lists &&Reverse Integer
1.Merge k Sorted Lists简单的多路归并,原创 2014-07-09 19:13:36 · 246 阅读 · 0 评论 -
【LeetCode】Maximum Depth of Binary Tree&&Same Tree
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution { publi原创 2014-07-08 16:26:49 · 316 阅读 · 0 评论 -
【九度OJ合集】P1516-P1557
P1526import java.util.LinkedList;import java.util.Scanner;public class Exercise1526 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int in; int[] a; wh原创 2014-05-15 18:38:26 · 555 阅读 · 0 评论 -
【九度OJ合集】P1050-P1100
P1000import java.util.Scanner;public class Exercise1000 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()) { System.out.println(sc.ne原创 2014-03-10 21:23:16 · 804 阅读 · 0 评论 -
PPTV合集
1、给定一个方法f();这个方法一次可以排序5个数,给定25个无序的数,怎么只用这个方法从这25个数中选出前4个,最少要调用几次这个方法?转载 2014-04-22 10:07:13 · 774 阅读 · 0 评论 -
【九度OJ合集】P1359-1414
p1402import java.io.BufferedInputStream;import java.io.StreamTokenizer;import java.util.BitSet;public class Exercise1402 { public static void main(String[] args) throws Exception { StreamToke原创 2014-04-22 10:15:53 · 470 阅读 · 0 评论 -
锦标赛算法应用:赛马问题
25匹赛马,没有秒表,五条赛道。如何用最少的比赛选出最快的前三匹马?通用解法:原创 2014-08-18 13:59:15 · 913 阅读 · 0 评论