*博客头图：

RGB颜色，例如：#AFAFAF

Hover：

RGB颜色，例如：#AFAFAF

RGB颜色，例如：#AFAFAF

# type_q的专栏

• 博客(52)
• 收藏
• 关注

#### 原创 对Pollard's Rho算法的理解

2014-07-17 22:15:00 3706 2

#### 原创 灰太狼抓羊

2014-04-29 16:39:53 1431

#### 原创 正整数异或值问题

2014-04-29 13:00:20 1029

#### 原创 [Code Jam] Bribe the Prisoners

ProblemIn a kingdom there are prison cells (numbered 1 to P) built to form a straight line segment. Cells number i and i+1 are adjacent, and prisoners in adjacent cells are called "neighbours." A

2014-04-28 20:11:37 674

#### 原创 A^B = B^A

2014-04-27 13:30:59 734 2

#### 原创 [Code Jam] Millionaire

Problem C. MillionaireThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start Gui

2014-04-27 11:08:16 478

#### 原创 [Code Jam] Crazy Rows

ProblemYou are given an N x N matrix with 0 and 1 values. You can swap any two adjacent rows of the matrix.Your goal is to have all the 1 values in the matrix below or on the main diagonal. That i

2014-04-27 10:02:00 496

#### 原创 最大的划分

2014-04-26 23:43:15 696 2

#### 原创 最大角度

2014-04-26 08:31:12 895 1

#### 原创 拓展欧几里得算法

2014-04-25 10:40:07 512 2

#### 原创 HDOJ 1074-Doing Homework

2014-04-22 19:58:46 476

#### 原创 3Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet (a,b,c

2014-04-19 13:12:45 372

#### 原创 蚂蚁感冒

2014-04-19 11:18:17 871

#### 原创 3Sum Closest

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact

2014-04-18 22:23:43 377

#### 原创 求数列的下一个排列

class Solution {bool check(vector num){for(int i = 0; i {if(num[i] {return true;}}return false;}void adj(vector &num){int i = num.size() - 1;while(num[i - 1] >= num[i])

2014-04-18 22:09:06 457

#### 原创 Minimum Window Substring

Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T = "ABC"Minimum window is "BAN

2014-04-14 14:13:33 414

#### 原创 烟花效果

2014-04-13 23:14:41 558

#### 原创 心形函数-封心

2014-04-13 17:20:46 4946

#### 原创 风车——ctx.rotate(angle),ctx.translate(dx, dy)

2014-04-13 14:28:11 1356

#### 原创 getImageData(ox, oy, width, height)

2014-04-13 10:22:32 619

#### 原创 地宫取宝

2014-04-09 09:22:37 894

#### 原创 asp.net学习笔记

2014-04-08 19:15:02 347

#### 原创 <<javascript 高效图形编程>>笔记

2014-04-02 23:39:14 466

#### 原创 翻纸牌游戏

2014-04-01 23:25:14 1222

#### 原创 Populating Next Right Pointers in Each Node I & II

Populating Next Right Pointers in Each Node Total Accepted: 10797 Total Submissions: 31598My SubmissionsGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; Tre

2014-03-26 16:47:37 489

#### 原创 送礼物

2014-03-24 23:26:25 550

#### 原创 Sum Root to Leaf Numbers

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find the tota

2014-03-20 20:14:29 389

#### 原创 Search in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array retur

2014-03-17 22:45:16 394

#### 原创 Single Number I & II

Single NumberGiven an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement i

2014-03-16 10:23:01 378

#### 原创 ZigZag Conversion

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I

2014-03-15 16:23:29 375

#### 原创 Median of Two Sorted Arrays

There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).这也算是一道经典题目了吧。背景应该是并归排序。class Solu

2014-03-14 23:54:44 372

#### 原创 Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe

2014-03-14 23:23:25 381

#### 原创 Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and sum

2014-03-13 15:16:38 385

#### 原创 Binary Tree Maximum Path Sum

Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 / \ 2 3Return 6.

2014-03-12 19:35:03 379

#### 原创 Decode Ways

A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total nu

2014-03-11 15:16:45 485

#### 原创 Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo

2014-03-10 15:05:53 434

#### 原创 子序列的个数

2014-03-09 17:25:45 587

#### 原创 交替字符串

2014-03-07 22:59:44 876 4

#### 原创 xor值最大

2014-03-07 22:38:37 1019

#### 原创 无穷字符串

2014-03-07 18:29:07 744

###### 空空如也

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

TA关注的人 TA的粉丝