Skip to content

Instantly share code, notes, and snippets.

@blessworld
blessworld / LeetCode_inorderTraversal_Solution.java
Created February 18, 2014 06:05
LeetCode_inorderTraversal
import com.sun.org.apache.regexp.internal.recompile;
import java.util.ArrayList;
/**
* Created by thedarkknight on 14-2-15.
*/
public class Solution {
public ArrayList<Integer> inorderTraversal(TreeNode root) {
ArrayList<Integer> list = new ArrayList<Integer>();
@blessworld
blessworld / LeetCode_inorderTraversal.java
Created February 18, 2014 06:04
LeetCode : inorderTraversal
import apple.laf.JRSUIUtils;
public class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) { val = x; }
}
@blessworld
blessworld / Main.java
Created February 18, 2014 06:02
LeetCode : Binary Tree Preorder Traversal
import java.util.List;
// 1
// / \
// 5 6
// / \ / \
// 10 11 19 22
public class Main {
// int[] data={7032,15013,6890,8877,11344,320,13037,9414,6817,1566,14907,-2756,9931,-4488,11602,4887,1239,6231,-5366,8501,1142,-1367,-4140,-5460,15554,-4686,12603,1471,5378,15246,11273,13817,5814,3846,12556,1024,3348,13880,14906,14002,9863,8177,-2043,15882,11985,13339,4277,-2059,581,2628,5101,6794,4636,9550,-6947,-5352,1854,3064,5149,-5342,-7716,5203,3842,6401,6644,3565,15758,-1451,4993,13767,7789,9944,5132,-3127,-5734,2149,5437,3967,12988,-5397,8306,-4744,-6542,6952,6653,-7588,-345,7975,-1608,-4125,-108,5960,-56,3410,9927,-7835,-2576,-1390,1154,13654,-6793,14489,14739,15465,12843,14656,9998,-4416,10104,4804,1556,9350,5791,8999,-4762,12242,13264,-7520,10069,4058,-2512,15701,2663,-2845,13834,-7731,2176,6491,16008,10067,1898,15861,9934,10788,3358,6423,-7036,10398,-1460,594,-573,-3391,-3095,-3940,9549,13679,-3841,9564,-4596,10625,8753,-4429,-4085,1421,7715,-3544,6997,5974,6788,7438,7242,2765,10202
@blessworld
blessworld / Solution.java
Created February 18, 2014 02:49
LeetCode:Populating Next Right Pointers in Each Node
import com.sun.org.apache.regexp.internal.recompile;
/**
* Created by thedarkknight on 14-2-15.
*/
public class Solution {
public void connect(TreeLinkNode root) {
if (root == null)
return ;
if (root.left != null){
@blessworld
blessworld / Solution_.idea_compiler.xml
Created February 15, 2014 06:57
LeetCode :Linked List Cycle-Java
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
@blessworld
blessworld / Solution_.idea_compiler.xml
Created February 14, 2014 08:36
Leetcode:Unique Binary Search Trees
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
@blessworld
blessworld / Solution_.idea_compiler.xml
Created February 14, 2014 06:45
LeetCode - Reverse Integer
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
MobileSafari:
Application Cache:
?
WebSQL:
/var/mobile/Library/WebKit/Databases/
WebStorage:
/var/mobile/Library/WebKit/LocalStorage/
IndexedDB:
?