Dec. 16, 2015, 7:16 p.m. |
+ 1 |
for
First-Nazarny
|
April 4, 2015, 1:26 p.m. |
+ 1 |
for Comment
veky: Two terminology issues: "pointers" are better called "references", or even "attributes" here. And fu...
|
April 3, 2015, 7:48 a.m. |
+ 1 |
for Comment
veky: t.lower() is a lowered t. But count is not "applied" (evaluated at some particular letter) until max...
|
April 2, 2015, 7:51 p.m. |
+ 1 |
for Comment
veky: It's not a trick, it's just a syntax feature: . has greater precedence than (), so a.f(x) is not a.(...
|
April 2, 2015, 6:39 p.m. |
+ 1 |
for Comment
veky: Beginners don't know many things. And more importantly, _different_ things (Many beginners told me "...
|
April 2, 2015, 6:36 p.m. |
+ 2 |
for
Shortest-veky
|
April 2, 2015, 6:31 p.m. |
+ 1 |
for Comment
veky: It's not stupid. This is just shorter (when you count in the import). And since here I was trying to...
|
April 2, 2015, 9:26 a.m. |
+ 1 |
for Comment
veky: Yes, but the only point where we actually might lose some shorter subsubsequences of longer final co...
|
April 1, 2015, 8:42 p.m. |
+ 1 |
for Comment
veky: It is short because I use Python's batteries. :-) Pseudocode: common is just a wrapper around recurs...
|
March 31, 2015, 9:09 p.m. |
+ 2 |
for
Dynamursion-veky
|
March 30, 2015, 7:22 p.m. |
+ 2 |
for
reduce-gyahun_dash
|
March 30, 2015, 7:15 p.m. |
+ 2 |
for
Short with fractions.Fraction-lskukan
|
March 24, 2015, 10:12 p.m. |
+ 2 |
for
First-Sim0000
|
March 19, 2015, 9:45 a.m. |
+ 2 |
for
O(N)-PositronicLlama
|
March 17, 2015, 11:30 p.m. |
+ 1 |
for Comment
Sim0000: Thank you for your comment :-) I hope following code may help your understanding. def factorial(n): ...
|
March 16, 2015, 10:20 a.m. |
+ 3 |
for
First-Sim0000
|
March 5, 2015, 6:31 p.m. |
+ 2 |
for
First-gyahun_dash
|
March 5, 2015, 4:46 p.m. |
+ 1 |
for Comment
nickie: Once more, well done! It was obvious that an O(N) dynamic programming solution was possible, but it ...
|
Feb. 22, 2015, 10:40 a.m. |
+ 2 |
for
Clearly-gyahun_dash
|
Feb. 22, 2015, 10:39 a.m. |
+ 1 |
for
First-Amachua
|
Feb. 22, 2015, 10:39 a.m. |
+ 1 |
for Comment
erik.white.2014: if language == "українська": return "Я люблю Python!"
|
Feb. 22, 2015, 10:34 a.m. |
+ 1 |
for
<3-Pouf
|
Feb. 22, 2015, 10:33 a.m. |
+ 1 |
for
First-thunderbird
|
Feb. 22, 2015, 10:06 a.m. |
+ 1 |
for
First-gautamas
|
Feb. 18, 2015, 10:42 p.m. |
+ 1 |
for
Drunk way to home-maelnor
|
Feb. 17, 2015, 4:14 p.m. |
+ 1 |
for Comment
Sim0000: I think two problem in your solution, First, if you want to get shortest path, you need to use prior...
|
Feb. 16, 2015, 8:13 a.m. |
+ 1 |
for
First-vova-ivanyshyn
|
Feb. 13, 2015, 5:40 p.m. |
+ 3 |
for
set-gyahun_dash
|
Feb. 12, 2015, 3:11 p.m. |
+ 2 |
for
Straightforward-nickie
|
Feb. 11, 2015, 7:12 p.m. |
+ 1 |
for
First-makoto_yamagata
|
Feb. 11, 2015, 7:08 p.m. |
+ 1 |
for
Triangular-PositronicLlama
|
Feb. 11, 2015, 7:08 p.m. |
+ 1 |
for Comment
PositronicLlama: Yes. The inner loop starts at 'i' so the function checks whether matr[k][k] == -matr[k][k] for each ...
|
Feb. 8, 2015, 9:44 a.m. |
+ 4 |
for
Could be shorter-veky
|
Feb. 2, 2015, 7:58 p.m. |
+ 1 |
for Comment
Sim0000: You can write **return not alphabet - text** or **return text == alphabet**.
|
Feb. 1, 2015, 12:41 p.m. |
+ 1 |
for
First-gyahun_dash
|
Jan. 30, 2015, 5:39 p.m. |
+ 2 |
for
First-takapt0226
|
Jan. 29, 2015, 8:55 p.m. |
+ 1 |
for
65-DiZ
|
Jan. 29, 2015, 8:53 p.m. |
+ 1 |
for Comment
DiZ: Strings are also iterable, so you can use _for_ loop and _in_ operator on them directly.
|
Jan. 29, 2015, 8:45 p.m. |
+ 1 |
for Comment
veky: You could have written `range(ord("a"), ord("z")+1)` for maintainability. :-D
|
Jan. 29, 2015, 8:44 p.m. |
+ 1 |
for
map(chr)-curious_k
|
Jan. 29, 2015, 8:42 p.m. |
+ 1 |
for
First-dagger126
|
Jan. 29, 2015, 9:04 a.m. |
+ 1 |
for Comment
veky: Thanks. It's a simple unary representation: 5 is "+++++", -3 is "---", 0 is "". It relies on a (nice...
|
Jan. 28, 2015, 10:14 p.m. |
+ 2 |
for
Second-erik.white.2014
|
Jan. 24, 2015, 9:14 a.m. |
+ 1 |
for
First-janpaweldrugi
|
Jan. 24, 2015, 9:11 a.m. |
+ 1 |
for
First-gyahun_dash
|
Jan. 13, 2015, 9:09 a.m. |
+ 2 |
for
First-tamacjp
|
Jan. 13, 2015, 8:27 a.m. |
+ 1 |
for
First-Sim0000
|
Jan. 6, 2015, 3:18 p.m. |
+ 3 |
for
First-Sim0000
|
Jan. 6, 2015, 3:10 p.m. |
+ 1 |
for
Minimal-BertrandBordage
|
Jan. 6, 2015, 3:07 p.m. |
+ 1 |
for Comment
veky: Without it, sums would be an iterator, and min(sums) would exhaust it, so I couldn't give it to sums...
|
Jan. 6, 2015, 11:57 a.m. |
+ 1 |
for Comment
veky: Imagine you have a list x of million items. What does x.pop(0) do? * it returns x[0] * it sets x[0] ...
|
Jan. 6, 2015, 11:56 a.m. |
+ 1 |
for
Double ended-veky
|
Jan. 4, 2015, 11:13 a.m. |
+ 1 |
for
First-cardinam
|
Dec. 10, 2014, 10:45 p.m. |
+ 1 |
for Post
Recommended books
|
Nov. 27, 2014, 3:27 p.m. |
+ 1 |
for
Single ended-veky
|
Sept. 7, 2014, 12:24 p.m. |
+ 1 |
for
This Week In Python: Quantum datetime Travel
|
Sept. 6, 2014, 10:35 a.m. |
+ 1 |
for
First-Renelvon
|
Sept. 5, 2014, 9:17 p.m. |
+ 1 |
for
last minus first-hanpari
|
Sept. 5, 2014, 9:05 p.m. |
+ 1 |
for
for else-veky
|
Sept. 5, 2014, 9:04 p.m. |
+ 1 |
for Comment
veky: Liskov says it does. :-P >>> issubclass(bool, int) True
|
Sept. 5, 2014, 8:44 p.m. |
+ 1 |
for
Set permutations-nickie
|
Sept. 5, 2014, 8:42 p.m. |
+ 1 |
for
Double loop-bryukh
|
Sept. 5, 2014, 7:49 p.m. |
+ 1 |
for
Speedy-Cjkjvfnby
|
Sept. 5, 2014, 12:12 p.m. |
+ 1 |
for
filter-veky
|
Sept. 4, 2014, 5:51 p.m. |
+ 1 |
for
Functional-ciel
|
Sept. 4, 2014, 5:49 p.m. |
+ 1 |
for
First-gyahun_dash
|
Sept. 4, 2014, 5:49 p.m. |
+ 1 |
for
operators-Cjkjvfnby
|
Aug. 28, 2014, 7:58 a.m. |
+ 1 |
for
reduce-Sim0000
|
Aug. 26, 2014, 1:17 p.m. |
+ 2 |
for
wikipedia-Alf_
|
Aug. 18, 2014, 2:53 p.m. |
+ 1 |
for
First-bryukh
|
Aug. 14, 2014, 2:05 p.m. |
+ 2 |
for
Second-gyahun_dash
|
Aug. 14, 2014, 4:54 a.m. |
+ 1 |
for
First-gyahun_dash
|
Aug. 12, 2014, 11:40 a.m. |
+ 2 |
for
First-MaxGraey
|
Aug. 12, 2014, 8:02 a.m. |
+ 1 |
for Comment
veky: It's a standard thing in Python when writing a thin wrapper for another function (usually to handle ...
|
Aug. 12, 2014, 7:40 a.m. |
+ 2 |
for
Hinted-veky
|
Aug. 11, 2014, 7:35 a.m. |
+ 2 |
for
First-panaro32
|
Aug. 11, 2014, 7:22 a.m. |
+ 2 |
for
First-Hanna_Hofman
|
Aug. 7, 2014, 3:11 p.m. |
+ 1 |
for
First-Renelvon
|
Aug. 7, 2014, 2:18 p.m. |
+ 1 |
for
First-RRRQ
|
Aug. 7, 2014, 9:43 a.m. |
+ 1 |
for
First-panaro32
|
Aug. 6, 2014, 3:30 p.m. |
+ 1 |
for
Thanks to PL-bryukh
|
Aug. 6, 2014, 1:18 p.m. |
+ 1 |
for
sneaky offset-Renelvon
|