自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (3)
  • 收藏
  • 关注

原创 LeetCode: Add Two Numbers

/*You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a

2014-04-26 14:42:45 524

原创 LeetCode: Add Binary

Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".这个题目直接用

2014-04-26 14:39:44 343

原创 LeetCode: Permutation Sequence

/*The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""2

2014-04-26 14:36:51 477

原创 LeetCode: Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.使用ha'sh

2014-04-08 01:51:08 885

原创 LeetCode: Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321

2014-04-08 01:46:05 440

原创 LeetCode: Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example,   Given linked list: 1->2->3->4->5, and n = 2.   After removing the second node from th

2014-04-08 01:43:40 462

原创 LeetCode: Longest Consecutive Sequence

Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1, 2,

2014-04-08 01:40:47 438

原创 有AI的重力四子棋

这里展示了一个有AI的重力四子棋d

2014-04-05 14:52:26 4432

原创 LeetCode: Merge two sorted linked lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.

2014-04-05 14:42:28 449

原创 LeetCode: Remove Duplicates from Sorted List

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place wi

2014-04-05 14:35:14 294

原创 LeetCode: Linked_List_Cycle II

Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?

2014-04-05 13:54:39 354

原创 LeetCode: Linked List Cycle

Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?

2014-04-05 13:53:07 269

原创 Leetcode: Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST.此题用递归的方法,首先找到数组中的中值作为root,之后把中值左边的和右边的数组作为新数组分别做递归。/** * Definition for binary tree * publi

2014-04-05 13:50:36 328

原创 Leetcode: Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3},   1    \     2    /   3return [1,2,3].Note: Recursive solutio

2014-04-05 13:48:17 335

原创 Leetcode: Binary_Tree_Postorder_Traversal

/*Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3},   1    \     2    /   3return [3,2,1].Note: Recursive so

2014-04-05 13:42:19 377

原创 Leetcode: Copy List with Random Pointer

A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.此处分析参考了http://mp.weixin.qq.com/mp/

2014-04-03 04:03:27 480

原创 Leetcode: Balanced Binary Tree

从今天起逐渐把我做过的leetcode题目放上来。Balanced Binary TreeGiven a binary tree    struct TreeLinkNode {      TreeLinkNode *left;      TreeLinkNode *right;      TreeLinkNode *next;    }Populate e

2014-04-03 03:57:47 420

原创 贪吃蛇的java程序

import java.awt.*;import javax.swing.*;import java.awt.event.*;public class Snake extends JFrame {    private SnakePanel snakePanel = new SnakePanel();    private static final long serialV

2012-04-17 14:16:00 413

原创 扫雷的java程序

import java.awt.*;import java.awt.event.*;import javax.swing.*;public class JMinesweeper extends JFrame {    private int row = 10;    private int column = 10;    private int bombsNumbe

2012-04-17 14:13:23 448

原创 一个五子棋的java程序

import javax.swing.*;import java.awt.*;import java.awt.event.*;public class Gomoku extends JFrame {    privatefinal int CHESSBOARD_SIZE = 15;    privateJLabel jblWhite = new JLabel("Whit

2012-04-17 14:11:52 750

贪吃蛇java版

一个用java写的贪吃蛇程序,代码可以参考我的博客

2012-04-17

扫雷(java)

一个原创的扫雷程序,代码可参考我的博客。

2012-04-17

五子棋(java版)

一个原创java版的五子棋,功能有:图形界面、判断输赢、即时。目前还没有做出AI于玩家对战。如果谁思路可以与我联系,谢谢!

2012-04-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除