快錢筆試總結

面試流程:

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]

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