LeetCode - Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, ...     Continue Reading
Xin Qiu's avatar
Xin Qiu Jul 18, 2015

LeetCode - Same Tree

Given two binary trees, write a function to check if they are...     Continue Reading
Xin Qiu's avatar
Xin Qiu Jul 07, 2015

Linux C 程序设计基础学习

    Continue Reading
Xin Qiu's avatar
Xin Qiu Mar 27, 2015

LeetCode - Maximum Depth of Binary Tree

    Continue Reading
Xin Qiu's avatar
Xin Qiu Feb 28, 2015

HDOJ - 1002 A + B Problem II

A + B Problem IIAC了半天,老是一些细节没注意。 Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. InputThe first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line consists of two positive integers, A and B. Notice that the integers are very large, that means you should not process them by using 32-bit integer. You may assume the length of each integer will not exceed 1000. OutputFor each test case, you should output two lines. The first line is “Case #:”, # means the number of the test case. The second line is the an equation “A + B = Sum”, Sum means the result of A + B. Note there are some spaces int the equation. Output a blank line between two test cases.     Continue Reading
Xin Qiu's avatar
Xin Qiu Feb 03, 2015

HDOJ - 1089 A+B for Input-Output Practice (I)

A+B for Input-Output Practice (I)Problem DescriptionYour task is to Calculate a + b.Too easy?! Of course! I specially designed the problem for acm beginners.You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim. InputThe input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. OutputFor each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.     Continue Reading
Xin Qiu's avatar
Xin Qiu Jan 22, 2015

HDOJ - 1001 Sum Problem

Sum ProblemProblem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n. InputThe input will consist of a series of integers n, one integer per line. OutputFor each case, output SUM(n) in one line, followed by a blank line. You may assume the result will be in the range of 32-bit signed integer.     Continue Reading
Xin Qiu's avatar
Xin Qiu Jan 05, 2015

HDOJ - 1000 A + B Problem

A + B ProblemCalculate a + b InputThe input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line. OutputFor each pair of input integers a and b you should output the sum of a and b in one line,and with one line of output for each line in input.     Continue Reading
Xin Qiu's avatar
Xin Qiu Jan 04, 2015