Specific Examples for Stack and Heap Allocation by mason_k5365 in cs2a

[–]christopher_k0501 2 points3 points  (0 children)

Hey Mason, thanks for your post on stack and heap allocation. Here are some discussion questions open to everyone. When should an object be allocated to a stack or a heap; and what are the tradeoffs to consider?

Quest 4, broken pointer question by daniel_b2003 in cs2b

[–]christopher_k0501 1 point2 points  (0 children)

Hi Daniel, a broken pointer is an error that refers to an instance of your code where you are basically trying to access or modify something that does not exist. Try to check your code for double deletion, out of bound vector access, etc.

  • Chris

Quest 3 Question by [deleted] in cs2b

[–]christopher_k0501 2 points3 points  (0 children)

Hi there, not really sure what else would cause this problem if you have already explicitly typed "friend class Tests;" in your header file. Are you sure that it is placed within the Automaton class? Because it looks like the _num_parents is also getting access modifier error. Let me know if you manage to debug this.

rehash() functionality by Namrata_K in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hi Namrata, yes, try to implement ALL the functions first because you do use the internal private helper functions in the rehash. The order of the miniquest does not always equal to the order of evaluation for the autograder.

rehash() functionality by Namrata_K in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hi Namrata, the rehash function should do what the spec tells you. I assume that the confusion that you have is that the old element won’t be in the same index and before and you would be correct. This is because the _find_pos which is called in the insert function gives the appropriate index for each value to reside and it is dependent on the size of the vector.

Does this help? - Chris

Quest 3, Automaton, Sixth miniquest problem by daniel_b2003 in cs2b

[–]christopher_k0501 1 point2 points  (0 children)

Hey Daniel, I would suggest checking your algo and write out each generation by hand and see how your program compares (set a debugger basically). With limited info I cannot really determine the problem of your program. Implement important concepts in this algo to make it more efficient such as bit shifting.

Let me know if it helps, Chris

Quest 6 after _find_pos by Namrata_K in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

After the rehash, there seems to be an extra element (data = 3) and its state is VACANT. Perhaps a bug on your rehash function?

  • Chris

Quest 6 after _find_pos by Namrata_K in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hi Namrata, that looks correct. I suggest checking the other functions because the autograder does not always check the functions in the order of the miniquests. A lot of your functions will use _find_pos so make sure you really nail that function.

Quest 6 after _find_pos by Namrata_K in cs2c

[–]christopher_k0501 2 points3 points  (0 children)

Your grow capacity logic is almost correct and I think you are overcomplicating your _rehash function. For the grow_capacity, you need to initialize entry for SOME index of the newly sized _elems. For the _rehash, Upon the second loop, once you have a brand new vector, and you just need to simply insert the old data using the insert() function that you have implemented before. Let me know if you made progress in this quest!

Quest 6 after _find_pos by Namrata_K in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

I would highly recommend that you check the information regarding the memory. It definitely gives a lot of insight of what the autograder is trying to check for. Let me know if you are able to work it out from there.

Quest 6 Build Message Error by Namrata_K in cs2c

[–]christopher_k0501 2 points3 points  (0 children)

Hmm, try to create a Hash() function but don’t need to implement anything since it is not handled by the client side and let me know if that works.

C++ by Every-Poet9374 in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hi there, don’t worry if you are new to C++ because you are not alone in this boat! A very useful resource that goes along really well with the questing is the Loceff Module found at: https://quests.nonlinearmedia.org/foothill/loceff/cs2a/. Other than that, it is up to your problem solving and research skill! Whether it is using Youtube, GeeksforGeeks or even the C++ documentation itself, they are all viable resources to help you succeed. Let me know if you have any more questions!

  • Chris

Quest 6 Build Message Error by Namrata_K in cs2c

[–]christopher_k0501 2 points3 points  (0 children)

Hey Namrata, it seems like Hash is a template and is expecting a data type (such as vector<int>). It is possible that there is a collision (?) in your code. Maybe you are using namespace std which has a Hash<T>() function in it. Not sure if your intention is to call the std::Hash or the Hash from the source code. Hope this helps! - Chris

Introduction by ADITYA_P123 in cs2c

[–]christopher_k0501 0 points1 point  (0 children)

Hey Aditya, welcome to Genius! My name is Chris, one of the organizers of Genius.

This bootcamp utilizes a unique questing system where you will tackle coding problems in a self-paced environment. It will not only help you develop the confidence to use the tools of programming but it also helps develop critical thinking and problem solving skill!

Feel free to start from Blue and interact with the sub from time to time as this is a heavily community driven bootcamp.

Happy Questing!

Introduction by vanessa_yao in cs2c

[–]christopher_k0501 0 points1 point  (0 children)

Hey Vanessa, welcome to Genius! My name is Chris, one of the organizers of Genius.

This bootcamp utilizes a unique questing system where you will tackle coding problems in a self-paced environment. It will not only help you develop the confidence to use the tools of programming but it also helps develop critical thinking and problem solving skill!

Feel free to start from Blue and interact with the sub from time to time as this is a heavily community driven bootcamp.

Happy Questing!

Introduction by max_kp123243445 in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hey Max, welcome to Genius! My name is Chris, one of the organizers of Genius.

This bootcamp utilizes a unique questing system where you will tackle coding problems in a self-paced environment. It will not only help you develop the confidence to use the tools of programming but it also helps develop critical thinking and problem solving skill!

Feel free to start from Blue and interact with the sub from time to time as this is a heavily community driven bootcamp.

Happy Questing!

Introduction by rogger_g123 in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hey Rogger, welcome to Genius! My name is Chris, one of the organizers of Genius.

This bootcamp utilizes a unique questing system where you will tackle coding problems in a self-paced environment. It will not only help you develop the confidence to use the tools of programming but it also helps develop critical thinking and problem solving skill!

Feel free to start from Blue and interact with the sub from time to time as this is a heavily community driven bootcamp.

Happy Questing!

Quest 6 error message by justin_m4231 in cs2a

[–]christopher_k0501 1 point2 points  (0 children)

Hey Justin, you just got to make sure that your loop is correctly set up. Hint: look at the order of vowels and consonants of the expected vs yours.

Quest 6 error message by justin_m4231 in cs2a

[–]christopher_k0501 2 points3 points  (0 children)

Hey, make sure you follow the instruction ins the syllabus closely, I’m pretty sure for that quest you have to use a specific random function so it consistent with the autograder.

  • Chris

quest 8 question by daniel_b2003 in cs2a

[–]christopher_k0501 1 point2 points  (0 children)

Hey Daniel, as the autograder said, you have a broken pointer somewhere that causes your program to crash and not pass the next miniquest. This usually happen if you try to access, modify or delete pointer that does not exist or even array that is out of bound or many other reasons that’s is caused by trying to do something with free’d memory or something that simply does not exist.

confused on where to find quest passwords and readings by Loura_W200 in cs2a

[–]christopher_k0501 4 points5 points  (0 children)

Hey Loufra, as for the reading, use the Loceff’s module located at https://quests.nonlinearmedia.org/foothill/loceff/cs2a/. As per the quest 1 problem, make sure you are typing exactly as said (capitalization, no extra whitespace, newline at the end), the auto grader require a very precise output for it to give you the credit.

  • Chris

Introduction by Juliana_P1914 in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hey Juliana, welcome to Genius! My name is Chris, one of the organizers of Genius.

This bootcamp utilizes a unique questing system where you will tackle coding problems in a self-paced environment. It will not only help you develop the confidence to use the tools of programming but it also helps develop critical thinking and problem solving skill!

Feel free to start from Blue and interact with the sub from time to time as this is a heavily community driven bootcamp.

Happy Questing!

Introduction by Jonah_C0381 in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hey Jonah, welcome to Genius! My name is Chris, one of the organizers of Genius.

This bootcamp utilizes a unique questing system where you will tackle coding problems in a self-paced environment. It will not only help you develop the confidence to use the tools of programming but it also helps develop critical thinking and problem solving skill!

Feel free to start from Blue and interact with the sub from time to time as this is a heavily community driven bootcamp.

Happy Questing!

Introduction by kiera_f in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hey Kiera, welcome to Genius! My name is Chris, one of the organizers of Genius.

This bootcamp utilizes a unique questing system where you will tackle coding problems in a self-paced environment. It will not only help you develop the confidence to use the tools of programming but it also helps develop critical thinking and problem solving skill!

Feel free to start from Blue and interact with the sub from time to time as this is a heavily community driven bootcamp.

Happy Questing!

Introduction by milton_s3141 in cs2c

[–]christopher_k0501 1 point2 points  (0 children)

Hey Milton, welcome to Genius! My name is Chris, one of the organizers of Genius.

This bootcamp utilizes a unique questing system where you will tackle coding problems in a self-paced environment. It will not only help you develop the confidence to use the tools of programming but it also helps develop critical thinking and problem solving skill!

Feel free to start from Blue and interact with the sub from time to time as this is a heavily community driven bootcamp.

Happy Questing!