原创 面試準備之多線程(轉)
原文 : Java線程面試題 Top 50 不管你是新程序員還是老手,你一定在面試中遇到過有關線程的問題。Java語言一個重要的特點就是內置了對併發的支持,讓Java大受企業和程序員的歡迎。大多數待遇豐厚的Java開發職位都要求開
原创 面試總結之Java基礎(未完工)
1. JVM相關 1.1. 內存模型 圖片來源 : 深入理解Java內存模型(一)——基礎 jvm體系結構 運行時數據區: 1.2. 類加載機制和JVM體系結構 1.3. 垃圾回收機制 Java 內存模型及GC原理
原创 synchronized 及 線程通信
線程通信 推薦文章 線程通信 通信方式 共享對象 wait notify 和 notifyAll機制 (併發包中的Condition) 注意點 不要在字符串常量或全局對象中調用wait(),因爲可能調用notify或noti
原创 樹的層序遍歷(深度優先 和 隊列)
題目: Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right,
原创 enum枚舉類的一個簡單例子
定義一個枚舉類: public enum Time { // 通過構造方法給常量傳值 DATE1("2016-6-26 12:14:10"), DATE2("2016-6-26 12:14:10"), DATE3(
原创 Binary Tree Maximum Path Sum
題目:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree. Binary Tree
原创 Binary Tree Right Side View
題目:Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can s
原创 Construct Binary Tree from Preorder and Inorder Traversal
題目:根據中序遍歷和前序遍歷數組構建二叉樹 解題思路: 比如 : pre = { A , B , D , E , C} in= {D , B , E , A , C} 1. A 爲root, 在中序遍歷中 , 找到左子樹節點
原创 Container With Most Water (頭尾指針的妙用)
對於數組 A , 怎麼求的Max((j - i) * [min (A[i] , A[j])]) , 其中 i , j < A.length - 1 這道題目, 暴力的話,很容易, O(n^2) , 可是採用頭尾指針的
原创 Reverse Integer
注意: 這道題目不難,但是多處要注意: 1. 0結尾 2. 反轉過來是否越界 3. 負數與正數 // 可以利用 StringBuffer 的 reverse()方法的
原创 實習記錄
跨域操作 HTTP訪問控制(CORS) Spring MVC REST SSO單點登錄 Json :jsckson框架 CopyOnWriteArrayList 點贊 收藏 分享 文章舉報
原创 二叉樹反轉(Invert Binary Tree )
思路: 一次前序遍歷 public class Solution { public TreeNode invertTree(TreeNode root) { if(
原创 Binary Search Tree Iterator
題目:寫一個BST遍歷器 1. 初始化遍歷器 2. next() will return the next smallest number in the BST 3. next() and has
原创 JBoss 部署EJB應用並在客戶端調用
參考文章 : JBoss AS 7 remote EJB client tutorial EJB invocations from a remote cl
原创 面試準備之數據庫部分
收藏文章: 數據庫建表原則 數據庫範式 1NF 原子性,表中列不能在分,比如地名可以有省,市,區..構成,如果把省市區放在一個字段裏面,那麼 陝西省的人,省都是陝西,這樣不就是一種冗餘,而且,你想統計所有陝西的人,那麼你就