Search:

Type: Posts; User: SilentStrike

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    13
    Views
    3,776

    I think algorithm contests are good for interview...

    I think algorithm contests are good for interview preparation and for fun.
  2. Thread: Question.

    by SilentStrike
    Replies
    14
    Views
    5,144

    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
    3,695

    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. Replies
    14
    Views
    1,448

    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.
  5. Replies
    1
    Views
    1,205

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

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

    Your biggest mistake is here



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


    In particular, you are decreasing n each recursive call, but n itself is supposed to be the...
  6. Replies
    4
    Views
    1,565

    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. Replies
    5
    Views
    4,168

    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. Replies
    29
    Views
    5,954

    Maybe your professor is just bad? Do you have...

    Maybe your professor is just bad? Do you have any specific questions?
  9. Replies
    5
    Views
    3,860

    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. 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. 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. Replies
    10
    Views
    2,806

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

    The comma in the if is really odd.

    Instead of



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


    Did you mean
  13. Replies
    6
    Views
    19,027

    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. Replies
    6
    Views
    19,027

    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. 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. Replies
    15
    Views
    3,111

    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. Replies
    1
    Views
    2,448

    Your way seems fine.

    Your way seems fine.
  18. Replies
    2
    Views
    2,980

    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)

    instead of


    for (int i = 0; i <= 99; ++i)
  19. Replies
    14
    Views
    4,106

    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. Replies
    14
    Views
    4,106

    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...
  21. Replies
    1
    Views
    1,122

    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)
    ...
  22. Replies
    4
    Views
    6,430

    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.
  23. Replies
    4
    Views
    6,430

    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. Replies
    5
    Views
    1,606

    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...
  25. Replies
    29
    Views
    2,577

    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 2 3 4