# Search:

Type: Posts; User: SilentStrike

Page 1 of 20 1

1. ## Thread: Importance of Algorithmics

by SilentStrike
Replies
13
Views
2,648

### I think algorithm contests are good for interview...

I think algorithm contests are good for interview preparation and for fun.

by SilentStrike
Replies
14
Views
2,804

### I work in the US as a software engineer. The...

I work in the US as a software engineer.

The cultures really are that different. I have a German coworker; he is constantly surprised by the amount of personal information employers gather. For...
3. ## Thread: BA or BS?

by SilentStrike
Replies
8
Views
2,134

### My university offered both a BA and a BS in...

My university offered both a BA and a BS in computer science. The BS was strictly harder to get, it had more requirements. If you want to go far in academia in Computer Science (IE, getting a phd),...
4. ## Thread: Stuck with huge number

by SilentStrike
Replies
14
Views
1,162

### If you can factor a number that large, these...

If you can factor a number that large, these guys will probably pay you quite handsomely.

by SilentStrike
Replies
1
Views
1,090

### Mostly, you have a problem with off by 1s. ...

Mostly, you have a problem with off by 1s.

Perm(a,k+1,n-1);

In particular, you are decreasing n each recursive call, but n itself is supposed to be the...

by SilentStrike
Replies
4
Views
1,388

### The entropy is p1 log2 (1/ pi) + p2 log2 (1 / p2)...

The entropy is p1 log2 (1/ pi) + p2 log2 (1 / p2) + p3 log2 (1 / p3) .. p14 log (1 / p14). The entropy is maximized when all the probabilities are equally likely, so all are 1/14, in which case the...
7. ## Thread: Generating Code at run-time

by SilentStrike
Replies
5
Views
1,695

### The only generate code at runtime thing I have...

The only generate code at runtime thing I have ever seen is for this..

http://www.transgaming.com/index.php?module=ContentExpress&file=index&func=display&ceid=8
8. ## Thread: Logic for computer science.

by SilentStrike
Replies
29
Views
3,105

Maybe your professor is just bad? Do you have any specific questions?
9. ## Thread: ACM online judge (problems)

by SilentStrike
Replies
5
Views
2,109

### Do you mean http://acm.uva.es? This is my...

Do you mean http://acm.uva.es?

This is my account http://acm.uva.es/problemset/usersjudge.php?user=46682
10. ## Thread: Compiling Wesnoth on Ubuntu 5.10 gives errors: clipboard.cpp

by SilentStrike
Replies
6
Views
1,631

### You should install it. It's really a great game....

You should install it. It's really a great game. Perhaps it is even the best open source game availible.
11. ## Thread: Compiling Wesnoth on Ubuntu 5.10 gives errors: clipboard.cpp

by SilentStrike
Replies
6
Views
1,631

### You could just apt-get install it, though I guess...

You could just apt-get install it, though I guess the version you get is too old.

I am running Ubuntu 5.10, libsdl version 1.2.8 (installed either by default or via apt-get).

rob:/etc\$ cat...
12. ## Thread: infinit loop on istream test

by SilentStrike
Replies
10
Views
2,553

### The comma in the if is really odd. Instead of...

The comma in the if is really odd.

while (cin >> ival, !cin.eof()) {

Did you mean
13. ## Thread: vector of strings with iterators.

by SilentStrike
Replies
6
Views
16,607

### The warning is not because you are derefencing...

The warning is not because you are derefencing the character, but rather because toupper returns an int.

http://www.sensi.org/~alec/man/man3/toupper.html
14. ## Thread: vector of strings with iterators.

by SilentStrike
Replies
6
Views
16,607

### If you want to see how to actually manipulate the...

If you want to see how to actually manipulate the data using iterators, check out this code, which uppercases input text line by line.

The problem with your code is that you were making a...
15. ## Thread: Please Excuse My Dear Aunt Sally (Expression Tree Help)

by SilentStrike
Replies
1
Views
2,221

### I recommend you first write a context free...

I recommend you first write a context free grammar for the expressions you want to accept. After you have your grammar, you can usually turn it into a recursive descent parser fairly easily.
...
16. ## Thread: choosing right sort algorithm

by SilentStrike
Replies
15
Views
2,023

### For the following problem, a sorted vector will...

For the following problem, a sorted vector will be faster than an STL map (or STL set, use the same structure internally) as well.

Given a list of words, and then a list of queries, determine...
17. ## Thread: permutations of a string

by SilentStrike
Replies
1
Views
1,653

18. ## Thread: poker full house!!

by SilentStrike
Replies
2
Views
2,392

### Conventially, if you want to count from 0 to 99...

Conventially, if you want to count from 0 to 99 in C or C++, one writes

for (int i = 0; i < 100; ++i)

for (int i = 0; i <= 99; ++i)
19. ## Thread: need help program crashing

by SilentStrike
Replies
14
Views
2,195

### By implement properly, I mean that you should...

By implement properly, I mean that you should probably just copy the string data.

Alternatively, just use an stl string (from <string>) rather than your Key class (if allowed), as it looks like...
20. ## Thread: need help program crashing

by SilentStrike
Replies
14
Views
2,195

### I don't know if this will fix your crashing, but...

I don't know if this will fix your crashing, but I think you want to take a reference to a key rather than a key in your BST(key) constructor. Also, your Key class copy constructor should be...

by SilentStrike
Replies
1
Views
951

### I think your problem is that it's not. ...

I think your problem is that it's not.

Experimentally...

i, p(i), p(i)/p(i-1)

>>> for i in range(2, 40): print i, p(i), float(p(i)) / p(i - 1)
...

by SilentStrike
Replies
4
Views
5,249

### If you represent the graph in that fashion...

If you represent the graph in that fashion without any augmenting data structures, your addEdge method will be slow. You need to rethink the data structure if you want it to be efficient.

by SilentStrike
Replies
4
Views
5,249

### I don't actually understand how your...

I don't actually understand how your representation of the edge_matrix can work. What does edge_matrix[i][j] == true mean? What do i and j represent? The i'th and j'th verticies? It seems you...
24. ## Thread: Question on permutated indices

by SilentStrike
Replies
5
Views
1,328

### It seems to me that you want to solve a problem...

It seems to me that you want to solve a problem like this?

http://acm.uva.es/p/v1/123.html

I don't see how rotating your strings really helps you. I solved that problem using a fairly advanced...

by SilentStrike
Replies
29
Views
2,119

### Actually, I'd say these people are MUCH smarter...

Actually, I'd say these people are MUCH smarter than me, and probably a bit smarter than you. They are squeezing seconds off of coding time, not running time.

Take a look at this, for example...
Results 1 to 25 of 500
Page 1 of 20 1