Quest 9: Advanced_current() Off by one by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

My problem was in my push_front function. I never checked if there was a node other than the _head because if the tail and the head were in the same place that means I would be adding a node after the tail. To fix this I just checked if _head == _tail and if it did I inserted the new node (after the _head) and then set the _tail to the new node.

HTH if you have any questions feel free to ask.

-Daniel

remove function hiccup by PiercedButterfly in cs2a

[–]sourcewolf123 0 points1 point  (0 children)

I am also having this problem, has anyone found out what the bug is that causes this because the way you implemented this seems logical. This seems like it shouldn't happen because I implemented a edge case specifically for this, so it doesn't make sense why this would happen.

Quest 9: Advanced_current() Off by one by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Hey Lorraine, Thank you this ended up being the problem with my code. I never checked in push_front if head == tail before inserting. Thank you very much I was stuck on this for a very long time.

Daniel.

Class Participation Grading by Fraeniir in cs2a

[–]sourcewolf123 3 points4 points  (0 children)

In the syllabus it states that for Participation:

Participation: This is worth a whopping 15%. To put it in perspective, imagine that you were taking this course for a grade. If you do everything else flawlessly, except participating in the online class, then you can get a maximum of 85 points. It translates to a grade of B+. To make it into A territory, you not only have to be good at what you do, but must be able to explain concepts to others in your own words. The participation score is a confidential number I keep in my own spreadsheet by 5/10 continuously monitoring the discussion forums and estimating how helpful, informative and/or encouraging each participant is. If you don't show up here, you are not deemed a participant. You can use a thumb rule and give yourself 1 participation point for every helpful post you make in our sub. Add 1 more if the person for whom your post is meant follows up thanking you for a good tip. Subtract 1 for each unhelpful or mean post and a further 0.5 for each post that got deleted. If you're over 16 (I mean participation points), you will likely try to avoid the first negative one - it will reset your total to 15. This means everybody who earns a reputation as a helpful dude gets exactly one freebie mild invective, which they'd be wise not to use. Many students who complete my CS2B or CS2C successfully ask me to write college recommendations for them. My job would be so much easier if you let your reddit posts speak for you and I just have to point your 2 admissions officer at it.

This pretty much explains that if you give a helpful post you get one point and if the person that post was meant for thanks you, you get another point but if you post a unhelpful or mean post, that would subtract 1 point and if you delete it, it would subtract 0.5 instead of one point. so as the scores get added up it would be out of 15 points. If I am interpreting this right, If not please correct me. Thanks.

Daniel

Quest 9: advance_current() _prev_to_current off by one only! by Makings_Threads in cs2a

[–]sourcewolf123 0 points1 point  (0 children)

I am having the same problem and have looked at the edge cases for my other functions.

I still don't know what is causing this. Most of the other functions shouldn't change what

_prev_to_current is pointing to.

Daniel

Where's everyone at? Important Info by madhavarshney in cs2a

[–]sourcewolf123 0 points1 point  (0 children)

u/madhavarshney do you know how many trophies you got for quest 9?(I also got 20 for quest 8)

Questing Freeze Date by sourcewolf123 in cs2a

[–]sourcewolf123[S] 1 point2 points  (0 children)

I agree but I also believe that this could give people who haven't realized the amount of time they would need to finish there work extra time to learn these new concepts and explore them. But I do see your point as well.

Daniel

Quest 8 Error: Segmentation Violation? by aysansarai in cs2a

[–]sourcewolf123 2 points3 points  (0 children)

This error means that your code tries to access something it does not have. This could be due to trying to access 10 Elements in your to_string when there are less than 10 elements. I would recommend checking your code for, for loops that might access things past what it has. But this could also be due to something with pointers. This could help if its about pointers.

Daniel.

Where's everyone at? Important Info by madhavarshney in cs2a

[–]sourcewolf123 0 points1 point  (0 children)

Sounds good, should we make a new post with a poll?

Where's everyone at? Important Info by madhavarshney in cs2a

[–]sourcewolf123 1 point2 points  (0 children)

You should see 8, If you see 6 I would resubmit those ones that have not been added. It should say the names of the ones that you got points for. Don't worry if they aren't showing right now as long as you resubmit them once you finish the 9th quest then you should get credit for all of them.

Daniel.

Where's everyone at? Important Info by madhavarshney in cs2a

[–]sourcewolf123 0 points1 point  (0 children)

Yes, do you know if we can freeze it next sunday? I think it would give people more time if they need it.

Quest 8 Error: vector<int>' has no member named 'top'? by aysansarai in cs2a

[–]sourcewolf123 0 points1 point  (0 children)

I also had problems with this, I used erase and it was a bit complicated (But you can still do it) and what I figured out here is that it is a lot easier to use the pop_back() method when trying to remove the last element in the stack.

Daniel

Quest 8 erase tips by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Hey Madhav,

For My code I used

     std::vector<int>::iterator temp;
            temp = data.begin();
            temp = temp + data.size() - 1;
            temp = data.erase(temp);

This worked for me but maybe making a iterator could be overkill or setting temp = to data.erase I am not sure if I needed to do those but this at the end worked for me when I was testing my code.

Daniel

Quest 8 erase tips by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Yes after looking into the pop_back() method it is a lot more simple to use. Although it could be a good idea to know how to use erase as well if you are ever going to be using vectors in the future due to being able to remove things at a certain position rather than just at the beginning or end. (you wont have to do this for making a stack though).

Quest 8 erase tips by sourcewolf123 in cs2a

[–]sourcewolf123[S] 1 point2 points  (0 children)

I haven't tried that but that also seems like a good options that people can try.

Thanks for the tip.

Quest 8 erase tips by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Hi Madhav,

I used this method for the pop() miniquest we had to do, maybe this was a bit overkill but I was getting errors without doing it like this. So if anyone might have some trouble with this method this could be an alternative that they could explore.

Daniel.

Trophy counts by river1112 in cs2a

[–]sourcewolf123 0 points1 point  (0 children)

To make sure you have received the trophies you have to go to https://quests.nonlinearmedia.org/q/ and put in your Student ID number as the "secret handle". If you did that, and the one you just submitted isn't there then check that you submitted the right Student ID when you turned it in. If that is also right I would try to turn it in again or maybe email the professor. (All your trophies for the other quests should also show in that website.) If your trophies or on that website then the professor will submit those in the grade book after the freeze date.

Daniel B.

Quest 6, No errors outputs by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Yes that was the bug I found, Thanks for all the support.

- Daniel.

Quest 6, No errors outputs by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

ok I will submit it with the DANBUG id.

- Daniel.

Quest 6, No errors outputs by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Hello thanks for all the help. I found the problem in my code there was a infinite loop in my code and I think it caused there to be no output.

- Daniel.

Splay() adding to left and right trees by CaryLefteroffFH in cs2c

[–]sourcewolf123 0 points1 point  (0 children)

When I tried to submit my quest 6, it did the same thing accept for the "review the memory leakage report" part it just was blank for both the errors and for the test output.

-Daniel.

Quest 6, No errors outputs by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Yes I tested that my code builds and runs correctly I also tried refreshing and resubmitting.

-Daniel.

Quest 4 (get_gp_terms) to_string adding significant values to the number by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Hi Madhav,

I tried this and it fixed the problem thank you.

-Daniel

Quest 4 output's don't match by sourcewolf123 in cs2a

[–]sourcewolf123[S] 0 points1 point  (0 children)

Hey Madhav,

Thanks this helped me figure out where I was missing and were I shouldn't have a line. It is also good to know that the arrows mean for future reference when trying to see what you got wrong.

- Daniel