- 博客(23)
- 资源 (8)
- 收藏
- 关注
原创 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: Recur
2014-09-02 21:07:53
692
原创 Valid Parentheses
问题描述Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}"
2014-09-02 19:47:04
651
原创 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
2014-09-02 19:04:09
804
原创 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: Recurs
2014-09-02 16:47:02
756
原创 Maximum Depth of Binary Tree
问题描述Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.解决方案/** * Definition fo
2014-09-01 22:47:20
693
原创 Pascal's Triangle
问题描述Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]
2014-09-01 16:37:46
632
原创 Reverse Integer
问题描述Example1: x = 123, return 321Example2: x = -123, return -321Have you thought about this?Here are some good questions to ask before coding. Bonus points for you if you have already
2014-09-01 15:10:30
643
原创 Same Tree
问题描述Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.解决
2014-09-01 14:35:21
687
原创 Reverse Words in a String
问题描述Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".解决方案public class Solution { public String reverseWord
2014-08-31 21:44:35
696
原创 Plus One
问题描述Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.
2014-08-31 21:35:34
678
原创 初识JavaFX(二)
import javafx.application.Application;import javafx.geometry.Pos;import javafx.geometry.HPos;import javafx.geometry.Insets;import javafx.scene.Scene;import javafx.scene.control.Button;import jav
2014-06-28 17:29:21
1813
原创 初识JavaFX (一)
import javafx.application.Application;import javafx.scene.Scene;import javafx.scene.control.Button;import javafx.stage.Stage;public class Program extends Application{ @Override public vo
2014-06-28 10:05:28
1204
原创 Qt-旋转图案
taowidget.h#ifndef _TAOWIDGET_H_#define _TAOWIDGET_H_#include class QTimer;class TaoWidget : public QWidget{public: TaoWidget( QWidget * = 0 ); protected: void paintEvent( QPai
2014-04-23 17:35:19
1107
原创 Qt打砖块游戏
程序由自定义的 5 个类构成: • Ball 类代表小球,包含小球所在矩形于窗格 (frame) 中的位置,另外,小球还包含变量来表示小球的颜色、运动速度等属性。• Brick 类代表砖块,砖块同样包含尺寸、方位、颜色这些信息。• Paddle 类代表划浆,划浆包含移动步长、方位、颜色这些信息。• Game 类代表游戏窗格,用来直接控制小球的运行,划浆的移动,及砖块的绘
2014-04-06 13:37:17
7133
5
原创 Qt-信号映射器
numerickeypad.h#ifndef _NUMERICKEYPAD_H_#define _NUMERICKEYPAD_H_#include class QPushButton;class QLineEdit;class NumericKeypad : public QWidget{ Q_OBJECT public: NumericKeypa
2014-03-22 23:15:14
2518
原创 Qt-文本绘制
drawtext.h#ifndef _DRAWTEXT_H_#define _DRAWTEXT_H_#include #include class DrawText : public QWidget{ public: DrawText( QWidget * = 0 ); protected: void paintEvent( QPaintEvent *
2014-03-22 22:59:21
855
冈萨雷斯 数字图像处理MATLAB第二版课本配套全部资源
2013-10-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人