2,057 reputation
616
bio website home.arcor.de/hirnstrom
location berlin.de
age 48
visits member for 2 years, 4 months
seen May 27 at 23:38
stats profile views 183

scala, java, linux

searching job in Berlin.


Jun
1
comment Big integer multiplication
@boothby: That's right. If I multiply "9'999'999'999" (10 digits) with itself, the maximum intermediate value is 810, for 100 nines it is 8100 and for 1k 9s 8'100. At around 50 million nines, which is about 10 books of 500 pages of 70 rows of 60 digits put into the product we reach 4G, the maxint value. To push the border away, I could change the Int to Long which would cost one character. This would allow for 10G of Books full of digits to multiply. Unfortunately, my machine complains already when using 5000*5000 digits about missing Heap to perform the operation, and this is far, far away...
May
31
comment Generate Pascal's triangle
It wasn't meant as critique, just as a warning for the curious.
May
31
comment Generate Pascal's triangle
The last version should be used carefully for huge values of readInt, like 50. ;)
May
31
comment Big integer multiplication
@leftaroundabout: What do you call really long? I guess integers, longer as what is common in many libraries - 64 bit for example - is sufficient. Multiplying 2 numbers of 100 digits each schould be 10000 multiplications and some additions - nothing taking longer than a second in a scripting language.
May
30
comment Adding without using a + or - sign
Characters are counted in CodeGolf tagged questions. If a reader doesn't read the question again, he will get the impression that character count is important and probably make a misguided vote based on that assumption. So the rules say: No (+|-). In Tiebreak digits, ().,*/= are important. You should include that number in your answer, so that not every visitor has to count them himself.
May
30
comment Detect rotated strings
solution 2 fails on echo ofofo fofof | bash rotated.sh - doesn't it? Else I would remove even more WS: read a b[[ $a$a =~ $b&&${#a}-eq${#b} ]]&& echo yes||echo no. I had a very similar idea, and think it works.
May
30
comment Adding without using a + or - sign
+/- and above mentioned tie-breakers are interesting, not characters.
May
30
comment Adding without using a + or - sign
+/- and above mentioned tie-breakers are interesting, not characters.
May
30
comment Adding without using a + or - sign
+/- and above mentioned tie-breakers are interesting, not characters.
May
30
comment Adding without using a + or - sign
+/- and above mentioned tiebreakers are interesting, not chars.
May
30
comment Adding without using a + or - sign
10x +/-? Chars arn't interesting, just +/- and the tie-breakers.
May
30
comment Adding without using a + or - sign
+/- tiebreakers are interesting, not characters.
May
29
comment Subtracting, the old-fashioned way
@Gaffi: Thanks, but I guess I have to solve the NULL-constraint too. My first idea was that it would only be a few characters, but ... - more than I thought.
May
29
comment Remove vowels without using too many different characters
@tchrist: Especially the challenge didn't say "all vowels" and enumerated what we should consider as removable.
May
29
comment Remove vowels without using too many different characters
16 <!-- char-threshold-gymnastics -->
May
29
comment De-Nesting Lists
With echo instead of cut, it even would work - neutral operation in char count.
May
28
comment Remove vowels without using too many different characters
If you remove é, you might want to remove y too.
May
27
comment Sort an array with values of integer
Are the integers equally distributed, or normal distributed, or somehow else? How many of them and how big? Do you have some sample input, something like for i in {1..100}; do echo $((RANDOM%256)); done for example.
May
26
comment Output a playable crossword grid
@luserdroog: Ah - I'm a bit surprised - it is just one file, I'm not used to ps-format. It looked like 3 files to me. :) Looks good in gv.
May
26
comment What is the average of n, the closest prime to n, the square of n and the closest fibbonacci number to n?
a) any integer includes, in my usage of the word, zero and numbers below zero. b) the first Fibonacci number is 1, isn't it? c) the first prime is 2 d) The next prime to two - do you consider it to be 2 or 3?