E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
Leetcod
USACO Section 2.1: Ordered Fractions
1 /* 2 ID:
leetcod
3 3 PROG: frac1 4 LANG: C++ 5 */ 6 #include <iostream> 7 #include
·
2015-11-13 10:08
action
USACO Section 2.1: The Castle
1 /* 2 ID:
leetcod
3 3 PROG: castle 4 LANG: C++ 5 */ 6 #include <iostream> 7
·
2015-11-13 10:06
USACO
USACO Section 1.5: Checker Challenge
这题的关键是对半剪枝 1 /* 2 ID:
leetcod
3 3 PROG: checker 4 LANG: C++ 5 */ 6 #include <iostream&
·
2015-11-13 10:05
USACO
USACO Section 1.5: Superprime Rib
1 /* 2 ID:
leetcod
3 3 PROG: sprime 4 LANG: C++ 5 */ 6 #include <iostream> 7 #include
·
2015-11-13 10:05
USACO
USACO Section 1.5: Prime Palindromes
1 /* 2 ID:
leetcod
3 3 PROG: pprime 4 LANG: C++ 5 */ 6 #include <iostream> 7 #include
·
2015-11-13 10:04
USACO
USACO Section 1.5: Number Triangles
1 /* 2 ID:
leetcod
3 3 PROG: numtri 4 LANG: C++ 5 */ 6 #include <iostream> 7 #include
·
2015-11-13 10:03
number
USACO Section 1.4: Mother's Milk
这题其实暴力是可以的,因为给的限制条件就很小了,难点在于编程,struct state的写法和pour函数都是关键点 1 /* 2 ID:
leetcod
3 3 PROG: milk3
·
2015-11-13 10:48
USACO
USACO Section 2.1: Sorting a Three-Valued Sequence
简单题 1 /* 2 ID:
leetcod
3 3 PROG: sort3 4 LANG: C++ 5 */ 6 #include <iostream> 7 #
·
2015-11-13 09:17
sequence
leetcod
Pow(x, n)
题目:就是实现一个指数函数。 直接用一个while一直乘以n词肯定是会超时的。 自己写了用递归(而且是很挫的递归),测试了无数次,根据每个case去修改代码。终于可以AC了。不忍直视,自己写了好长,如下: class Solution { public: double pow(double x, int n) { int flag1 = 0, flag2 = 0
·
2015-11-13 08:00
etc
【
Leetcod
】Unique Binary Search Trees II
给定结点数n,结点值为1,2,...,n,求由这些结点可以构成的所有二叉查找树。 Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all
·
2015-11-13 04:23
Binary search
[LeetCode] 038. Count and Say (Easy) (C++/Python)
CountandSay(Easy)链接:题目:https://leetcode.com/problems/Count-and-Say/代码(github):https://github.com/illuz/
leetcod
hcbbt
·
2015-07-30 10:00
LeetCode
C++
算法
python
LeetCode Spiral Matrix II (生成螺旋矩阵)
Givenn=3,Youshouldreturnthefollowingmatrix:[ [1,2,3], [8,9,4], [7,6,5] ]题意:给出矩阵的维数,将1-n^2的数填入螺旋矩阵中思路:与
LeetCod
wuli2496
·
2015-07-05 14:00
Reorder List
leetcod
Givenasinglylinkedlist L: L0→L1→…→Ln-1→Ln,reorderitto: L0→Ln→L1→Ln-1→L2→Ln-2→…Youmustdothisin-placewithoutalteringthenodes'values.Forexample,Given {1,2,3,4},reorderitto {1,4,2,3}.题目的意思是要求对一个链表进行重新排序,如
yujin753
·
2014-12-17 22:00
LeetCode
list
reorder
LeetCode-Word Break
determineif s canbesegmentedintoaspace-separatedsequenceofoneormoredictionarywords.Forexample,givens = "
leetcod
xin_jmail
·
2014-09-09 21:00
LeetCode
[LeetCode] Single Number
href: https://oj.
leetcod
u014691362
·
2014-08-01 21:00
java
LeetCode
C++
number
single
[
leetcod
]Substring with Concatenation of All Words
Youaregivenastring,S,andalistofwords,L,thatareallofthesamelength.Findallstartingindicesofsubstring(s)inSthatisaconcatenationofeachwordinLexactlyonceandwithoutanyinterveningcharacters.Forexample,given:
jdflyfly
·
2014-06-25 17:00
java
LeetCode
String
hash
two-pointers
【Leetcode】Path Sum II
findallroot-to-leafpathswhereeachpath'ssumequalsthegivensum.Forexample:Giventhebelowbinarytreeand sum=22,5 /\ 48 //\ 11134 /\/\ 7251 return[ [5,4,11,2], [5,8,4,5] ]思路:与【
Leetcod
bjtu08301097
·
2014-06-18 19:00
leetcod
Wildcard Matching
上来想到用递归求解,结果超时,先是考虑把多个连续的*合成一个*处理,仍然超时,最后在http://blogs.com/x1957/p/3517096.html处看到,可以通过类似回溯的方式求解classSolution{public:boolisMatch(constchar*s,constchar*p){constchar*star=nullptr;constchar*rs=nullptr;wh
小王子__B612
·
2014-05-12 16:19
leetcode
算法
算法
leetcode之Word Break
determineifscanbesegmentedintoaspace-separatedsequenceofoneormoredictionarywords.Forexample,givens="leetcode",dict=["leet","code"].Returntruebecause"
leetcod
zhanghaodx082
·
2014-04-08 12:00
LeetCode
C++
算法
Leetcode Restore IP Addresses
(Orderdoesnotmatter)http://oj.
leetcod
worldwindjp
·
2014-03-16 20:00
java
面试题
DFS
leetcode解题报告
LeetCode(139)Word Break
determineifscanbesegmentedintoaspace-separatedsequenceofoneormoredictionarywords.Forexample,givens="leetcode",dict=["leet","code"].Returntruebecause"
leetcod
feliciafay
·
2014-02-09 02:00
LeetCode
递归
动态规划
leetcod
Binary Tree Level Order Traversal II
BinaryTreeLevelOrderTraversalII Givenabinarytree,returnthe bottom-uplevelorder traversalofitsnodes'values.(ie,fromlefttoright,levelbylevelfromleaftoroot).Forexample:Givenbinarytree {3,9,20,#,#,15,7},3
kenden23
·
2014-01-11 12:00
level
tree
binary
or
leetcod
Leetcode: Word Break
determineifscanbesegmentedintoaspace-separatedsequenceofoneormoredictionarywords.Forexample,givens = "leetcode",dict = ["leet","code"].Returntruebecause "
leetcod
doc_sgl
·
2013-10-06 00:00
LeetCode
break
dp
word
recursive
【
Leetcod
】Unique Binary Search Trees II
给定结点数n,结点值为1,2,...,n,求由这些结点可以构成的所有二叉查找树。Givenn,generateallstructurallyuniqueBST's(binarysearchtrees)thatstorevalues1...n.Forexample,Givenn=3,yourprogramshouldreturnall5uniqueBST'sshownbelow.13321 \//
u011988946
·
2013-09-15 18:00
LeetCode
二叉树
二叉查找树
search
二分查找树
上一页
1
2
3
4
5
6
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他