2015年11月4日

String to Integer (atoi)

摘要: package cn.edu.xidian.sselab;import java.util.HashMap;/*** title:String to Integer (atoi)* content:* Implement atoi to convert a string to an integer.... 阅读全文

posted @ 2015-11-04 22:13 wzyxidian 阅读(254) 评论(0) 推荐(0) 编辑

Same Tree

摘要: package cn.edu.xidian.sselab;/*** title:Same Tree* content:* Given two binary trees, write a function to check if they are equal or not.* Two binary t... 阅读全文

posted @ 2015-11-04 22:12 wzyxidian 阅读(134) 评论(0) 推荐(0) 编辑

Multiply Strings

摘要: package cn.edu.xidian.sselab;/*** title:Multiply Strings* content:* Given two numbers represented as strings, return multiplication of the numbers as ... 阅读全文

posted @ 2015-11-04 22:11 wzyxidian 阅读(205) 评论(0) 推荐(0) 编辑

Ugly Number

摘要: package cn.edu.xidian.sselab;/*** title:Ugly Number* content:* rite a program to check whether a given number is an ugly number.* Ugly numbers are pos... 阅读全文

posted @ 2015-11-04 22:06 wzyxidian 阅读(135) 评论(0) 推荐(0) 编辑

Delete Node in a Linked List

摘要: package cn.edu.xidian.sselab;import java.util.LinkedList;/*** title: Delete Node in a Linked List* content:* Write a function to delete a node (except... 阅读全文

posted @ 2015-11-04 22:04 wzyxidian 阅读(248) 评论(0) 推荐(0) 编辑

Excel sheet Column Title

摘要: package cn.edu.xidian.sselab;/*** title:Excel sheet Column Title* content:* Given a positive integer, return its corresponding column title as appear ... 阅读全文

posted @ 2015-11-04 22:02 wzyxidian 阅读(255) 评论(0) 推荐(0) 编辑

Add Two Numbers

摘要: package cn.edu.xidian.sselab;import java.util.ArrayList;/*** title:Add Two Numbers* content:* You are given two linked lists representing two non-nega... 阅读全文

posted @ 2015-11-04 21:58 wzyxidian 阅读(196) 评论(0) 推荐(0) 编辑

Add Binary

摘要: package cn.edu.xidian.sselab;/*** title:Add Binary* content:* Given two binary strings, return their sum (also a binary string).* For example;* a = "1... 阅读全文

posted @ 2015-11-04 21:55 wzyxidian 阅读(141) 评论(0) 推荐(0) 编辑

2015年10月29日

Excel Sheet Column Number

摘要: package cn.edu.xidian.sselab;/*** title:Excel Sheet Column Number* content:* Related to question Excel Sheet Column Title* Given a column title as app... 阅读全文

posted @ 2015-10-29 00:28 wzyxidian 阅读(216) 评论(0) 推荐(0) 编辑

2015年10月28日

Lowest Common Ancestor of a Binary Search Tree

摘要: package cn.edu.xidian.sselab;/*** title:Lowest Common Ancestor of a Binary Search Tree* content:* Given a binary search tree (BST), * find the lowest ... 阅读全文

posted @ 2015-10-28 23:44 wzyxidian 阅读(136) 评论(0) 推荐(0) 编辑

2015年10月27日

Invert Binary Tree

摘要: package cn.edu.xidian.sselab;/*** title:Invert Binary Tree* content:* nvert a binary tree. * 4* / \* 2 7* / \ / \*1 3 6 9*to* 4* / \* 7 2* / \ / \*9 6... 阅读全文

posted @ 2015-10-27 23:02 wzyxidian 阅读(135) 评论(0) 推荐(0) 编辑

Move Zeroes

摘要: package cn.edu.xidian.sselab;/** * titile:Move Zeroes * content: * Given an array nums, write a function to move all 0's to the end of it while mainta 阅读全文

posted @ 2015-10-27 23:02 wzyxidian 阅读(259) 评论(0) 推荐(0) 编辑

Contains Duplicate

摘要: package cn.edu.xidian.sselab;import java.util.HashSet;/*** title:Contains Duplicate* content:* Given an array of integers, find if the array contains ... 阅读全文

posted @ 2015-10-27 23:00 wzyxidian 阅读(175) 评论(0) 推荐(0) 编辑

2015年10月24日

Maximum Depth of Binary Tree

摘要: package cn.edu.xidian.sselab;/*** Given a binary tree, find its maximum depth.* The maximum depth is the number of nodes along the longest path from t... 阅读全文

posted @ 2015-10-24 22:45 wzyxidian 阅读(154) 评论(0) 推荐(0) 编辑

Java实现二叉树的构建与遍历

摘要: 转载:http://ocaicai.iteye.com/blog/1047397目录: 1.把一个数组的值赋值给一颗二叉树2.具体代码1.树的构建方法2.具体代码Java代码 packagetree;importjava.util.LinkedList;importjava.util.List;/*... 阅读全文

posted @ 2015-10-24 22:43 wzyxidian 阅读(493) 评论(0) 推荐(0) 编辑

导航