TL;DR: Easy fix. Remove "continue" on line 41.
Issue: is_partite function does not traverse the entire graph. This is because the "continue" on line 41 causes the "if" statement on the next line to be skipped entirely. This means that the queue (i.e. q) is never appended.
I commented out the "continue" and the function works perfectly now.
Please review and implement upon confirmation.
TL;DR: Easy fix. Remove "continue" on line 41.
Issue: is_partite function does not traverse the entire graph. This is because the "continue" on line 41 causes the "if" statement on the next line to be skipped entirely. This means that the queue (i.e. q) is never appended.
I commented out the "continue" and the function works perfectly now.
Please review and implement upon confirmation.