快钱笔试总结

面试流程:

1、HR发面试邀请,回执应聘信息表

2、按时赴约,前台登记,前台打印简历、应聘信息表,通知面试官

3、面试官简单了解一下,做题目

4、做完题目,面试官要求讲解一遍,聊一聊职位之类,没再过问技术

5、等通知(二周内回复),其实三天没戏就没戏了

吐槽:

迅付:笔试题考察的倒是挺全面,包括4道智力题,做完起码要1个半小时,而且好像他们很忙,交过笔试题,等了至少半小时,才有HR接待

汇付:面试官80后小青年,技术不咋的,吹牛,自以为是。据他说汇付从不用第三方框架,想消息队列之类的都自己写,原因是安全考虑,但交谈中透露用什么Q的消息队列,他的观点Redis单机缓存没有任何价值,他以为IP不是一种网络协议……总之,不知所云。

 

笔试4道题目 

模糊记得做如下记录:

第一题:考察java一元运算符和引用传递

代码:

package net.leo.kuaiqian;

public class Item {

	int id;
	String name;

	public Item(int id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	@Override
	public String toString() {
		return "Item [id=" + id + ", name=" + name + "]";
	}

}
public class Test1 {

	public static void main(String[] args) {

		List<Item> list = new ArrayList<Item>();

		for (int i = 0; i < 3; i++) {
			list.add(new Item(i, "value" + i));
		}
		change(list);
		for (Item item : list) {
			System.out.println(item.toString());
		}

	}

	static void change(List<Item> list) {

		for (Item item : list) {
			item.id = item.id++ + 100;
			item.name = "name" + item.id;
		}

	}

}

分析:

change方法里:item.id++  依据一元运算符规则,id=0,item.id++ 还是为0,然后+100,结果赋值给item.id,即item.id=100,所以item.name=name100

 

结果:

Item [id=100, name=name100]

Item [id=101, name=name101]

Item [id=102, name=name102]

 

 第二题:考察spring MVC框架

 

第三题:考察String基础函数,如substring,lastIndexOf,startWith,endWith

 

第四题:考察树遍历(前序遍历),题目printList方法为空,要求补充完整

前序遍历:即 从根节点出发,遍历左子树,再遍历右子树

代码:

package net.leo.alg;

import java.util.ArrayList;
import java.util.List;

/**
 * 先序遍历
 * 
 * @title 99bill test4
 * @description
 * @author cxh
 * @version
 * @create_date 2013-7-24
 * @copyright (c)
 */
public class Test2 {

	public static void main(String[] args) {
		Test2 test = new Test2();
		Node root = test.new Node("0", "root");
		Node a = test.new Node("1", "a1");
		Node b = test.new Node("2", "a2");
		Node c = test.new Node("3", "a3");
		root.childList.add(a);
		root.childList.add(b);
		root.childList.add(c);

		Node d = test.new Node("4", "b1");
		Node e = test.new Node("5", "b2");
		Node f = test.new Node("6", "b3");

		b.childList.add(d);
		b.childList.add(e);
		b.childList.add(f);

		printList(root);
	}

	/**
	 * 按前序遍历子节点
	 * 
	 * @description
	 * @author cxh
	 * @param root
	 */
	static void printList(Node root) {
		if (root == null) {
			System.out.println(root + " is null");
			return;
		} else {
			System.out.println(root.toString());
		}

		if (root.childList != null) {
			for (Node child : root.childList) {
				printList(child);// 递归遍历子树
			}
		}

	}

	/**
	 * 树节点
	 * 
	 * @title
	 * @description
	 * @author cxh
	 * @version
	 * @create_date 2013-7-24
	 * @copyright (c)
	 */
	class Node {

		List<Node> childList = new ArrayList<Node>();

		String id;

		String value;

		public Node(String id, String value) {
			super();
			this.id = id;
			this.value = value;
		}

		@Override
		public String toString() {
			return "Node [ id=" + id + ", value=" + value + "]";
		}

	}

}

 结果:

Node [ id=0, value=root]

Node [ id=1, value=a1]

Node [ id=2, value=a2]

Node [ id=4, value=b1]

Node [ id=5, value=b2]

Node [ id=6, value=b3]

Node [ id=3, value=a3]

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章