Questions tagged [lock-pairs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

PSET3 - Tideman - lock_pairs help needed

Pasting my code for the function lock_pairs below. I know it's not the best way to do it but nevertheless I was sure the logic behind it is sound because when I did my own testing it modified locked[][...
0 votes
0 answers
11 views

CS50 Tideman: lock_pairs skips final pair if it creates a cycle

I have been working on this for way longer than I'd like to admit. I'm certain there is a logic error, but I have keep running into the frowning face :( wall. What I've been struggling with ...
0 votes
0 answers
42 views

CS50 tideman - lock_pairs skips final pair if it creates cycle - without recursion

I am having trouble with locked_pairs function in tideman. I know the easiest solution for checking the cycle is with recursion, but I am trying to figure out if there is any possibility to solve this ...
0 votes
0 answers
42 views

Pset3 Tideman - lock_pairs

I would like to know what is wrong with the logic of my lock_pairs function Errors: :( lock_pairs locks all pairs when no cycles lock_pairs did not lock all pairs :( lock_pairs skips final pair if it ...
0 votes
0 answers
106 views

lock_pairs did not correctly lock all non-cyclical pairs

this is my code within the lock_pairs function for the tideman problem in pset3. I've looked through it numerous times and I can't find anything wrong with it. However, when I run it through check50, ...
  • 1
0 votes
0 answers
201 views

Tideman error: :( lock_pairs skips final pair if it creates cycle

It would be amazing if someone had the time to look through my code for the Tideman exercise :D I get the following error: :( lock_pairs skips final pair if it creates cycle lock_pairs did not ...
  • 1
1 vote
1 answer
1k views

PSET3 Tideman: Lock_Pairs Help

I've been stuck on this function of the PSET for a couple of days now. I have met every requirement in check50 except for the one that says, ":( lock_pairs skips final pair if it creates a cycle; ...
0 votes
1 answer
459 views

Pset 3 Tideman lock pairs function

Help, i'm losing my mind. I'm not sure where i'm going wrong in this function, it gives me an error on every line of check50 after sort pairs. Can anybody shed any light? Thank you in advance! J // ...