Skip to content

Commit

Permalink
Lab Dep Chains 1: Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
simveit committed Dec 20, 2024
1 parent 85d9670 commit 975cd9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labs/core_bound/dep_chains_1/solution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ unsigned solution(List *l1, List *l2) {
}
l2 = l2->next;
}
// Handle odd number
if (!l1->next || !l1->next->next || !l1->next->next->next) {
// Handle case where the number of elements is not divisible by 4.
if (!l1->next || !l1->next->next || !l1->next->next->next || !l1->next->next->next->next) {
break;
}
l1 = l1->next->next->next->next;
Expand Down

0 comments on commit 975cd9a

Please sign in to comment.