- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
IT, Programming, & Web Development › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 3: [Algorithms] – Linear Search, Binary Search, Bubble Sort, Selection Sort, Recursion, Merge Sort › How the value of pair_count updated?
On line no. 66, pair_count appears the second time with value initialized to 0. So how is that its value is further updated? Knowing pair_count value I believe help me know the number of voters through global variable pair_count. So while writing code for vote function, I can proceed with the following: if n(n-1)/2= x, then value of n will be number of voters.
Reply
https://edstem.org/us/courses/176/discussion/2652437?answer=6075604
[learn_press_profile]