Search:

Type: Posts; User: Zeus_

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: Kalah game !

    by Zeus_
    Replies
    1
    Views
    79

    Good question. Unfortunately, this forum is not...

    Good question. Unfortunately, this forum is not for solving questions unless you've attempted to solve it yourself and show us code.
  2. Replies
    3
    Views
    168

    It's a very good read. Thanks for linking it here.

    It's a very good read. Thanks for linking it here.
  3. You might wanna look at a few resources to learn...

    You might wanna look at a few resources to learn more about warnings.

    Here are a few good ones:
    Why Bother with Compiler Warnings? - Cprogramming.com
    0.11 — Configuring your compiler: Warning...
  4. Replies
    62
    Views
    1,424

    Oh yes, my bad. Sorry about that. I subtracted 84...

    Oh yes, my bad. Sorry about that. I subtracted 84 instead of 86 which led me to think that the equation was wrong. Well done :)
  5. Replies
    62
    Views
    1,424

    That would work only for a specific test case,...

    That would work only for a specific test case, not all possible cases. If this formula was meant for the original test sample, your equation is wrong. Test it out yourself :)

    What was the sample...
  6. Replies
    62
    Views
    1,424

    Yep, I linked the book from the Amazon website in...

    Yep, I linked the book from the Amazon website in my post which says the latest delivery is by Tuesday but I didn't order it from Amazon lol :) Found another website that was delivering within 24...
  7. Replies
    62
    Views
    1,424

    Cool, thanks, just placed the order. Will arrive...

    Cool, thanks, just placed the order. Will arrive by tomorrow.
  8. Thread: C++ Challenge

    by Zeus_
    Replies
    4
    Views
    281

    I know that Floyd's algorithm is an O(N) solution...

    I know that Floyd's algorithm is an O(N) solution to finding a loop in a linked list. You might wanna read about it on Wiki or something. I learnt a version of it recently while solving an ICPC...
  9. Replies
    62
    Views
    1,424

    @Hodor, I'll be ordering the book you mentioned...

    @Hodor, I'll be ordering the book you mentioned above in post #39. Is it this Buy Godel, Escher, Bach: An Eternal Golden Braid Book Online at Low Prices in India | Godel, Escher, Bach: An Eternal...
  10. Replies
    40
    Views
    1,178

    Wow, just wow.... how many years have you been...

    Wow, just wow.... how many years have you been programming in C++? That's an insane amount of new knowledge that I came across when reading the last few posts on this thread.
  11. Replies
    62
    Views
    1,424

    Thanks for the reference! I'll look it up at the...

    Thanks for the reference! I'll look it up at the school library tomorrow (I doubt that I will find it). Yes, I'm interested in algos and math (math is my favourite subject i.e. people who have no...
  12. Replies
    62
    Views
    1,424

    It takes about 3 seconds on my laptop. Nah, it...

    It takes about 3 seconds on my laptop.
    Nah, it doesn't work on all kinds of inputs.

    CodeWars - Sample Problems
    HP CodeWars 2020
  13. Replies
    62
    Views
    1,424

    I think the Python solution was from one of the...

    I think the Python solution was from one of the student teams that submitted the solution. Yes, it doesn't work as you mention. I tried doing different things too, and matched with my brute force...
  14. Replies
    62
    Views
    1,424

    I found a solution to the problem in Python,...

    I found a solution to the problem in Python, although I don't understand the language much and find it weird. I feel that my choice of C/C++ at school was a good decision.
    This works, but I don't...
  15. Replies
    1
    Views
    172

    User-defined types to built in types

    Hey!

    Is it possible to have an user-defined type behave exactly like another type, the other type being a built-in type? Every reference to the user-defined type in code is to be treated as a...
  16. Replies
    3
    Views
    199

    Where's your attempt at converting this C++ code...

    Where's your attempt at converting this C++ code to C? That code is almost C...

    A vector is like an array. Make an array of size 62 and convert push_back accordingly
    cout to printf
    etc...
  17. Replies
    21
    Views
    1,024

    Hey, found some time and implemented a few more...

    Hey, found some time and implemented a few more things today. Okay, so I know that @laserlight mentioned that my code will have undefined behaviour i.e. behaviour that's not been accounted by the...
  18. Replies
    3
    Views
    174

    Your code tries to create an array of your...

    Your code tries to create an array of your structure where each structure object holds an an array. What you're intending to do is creating one structure object and accessing its elements (in this...
  19. Replies
    4
    Views
    162

    Remember to do what rstanley said next time...

    Remember to do what rstanley said next time onwards.

    Your minid function looks wrong. You must loop through your entire list to find the minimum which in your code just returns the first...
  20. Replies
    62
    Views
    1,424

    Really, graphing gave a solution? That's probably...

    Really, graphing gave a solution? That's probably the last thing I would have thought about if I were you lol. Thanks for the idea. I'll do the same and see what I can arrive at. I think it makes...
  21. Replies
    62
    Views
    1,424

    This is what I've got for john's test case. It's...

    This is what I've got for john's test case. It's interesting to see definitely. I was doing many simple test cases to come up with a binary math equation to predict the value at any time given the...
  22. Replies
    62
    Views
    1,424

    Hey, no problem at all. Feel free to get back to...

    Hey, no problem at all. Feel free to get back to it whenever you can, there's no hurry. I think we've all got brute force algos working but the key here would be finding the pattern of repetition and...
  23. Have a temporary variable that stores the value...

    Have a temporary variable that stores the value of what the user enters in the previous iteration, add a check that if new input == value held by temporary variable then "Error"
  24. Replies
    62
    Views
    1,424

    Your PMs still seem to be turned off.... Would...

    Your PMs still seem to be turned off....
    Would you mind sharing your brute force method so I can compare with my brute force method and find what I'm doing wrong that you are not? Thanks!

    Also,...
  25. Where's your indentation at? Does your main...

    Where's your indentation at? Does your main function take command line arguments? I don't think you ever use int argc or char **argv so why do you think it's important to have them there?
Results 1 to 25 of 235
Page 1 of 10 1 2 3 4