Home of real teaching & learning
  • Full support for teachers
  • Focus on critical thinking
  • Engaging classroom activities
  • Integrated student eBook
  • Assessed tasks / qBank
  • Practice exam questions

The InThinking Guarantee: Our sites are written by expert practitioners and not by AI

See our AI policy

Disclaimer: InThinking subject sites are neither endorsed by nor connected with the International Baccalaureate Organisation.

Don't miss out, find out!

B2.4 Broken Code challenges - Python

B2.4 Broken Code challenges - PythonB2.4.1: Algorithms & Efficiency (Big O)# Topic B2.4.1: Big O Notation & Efficiency # CHALLENGE: This code checks if a list contains duplicates. # It works, but it does TWICE as much work as necessary! # # HINT: If we have compared element A to element B, do we need to # compare element B to element A later? # Look at where the inner loop (j) starts. def has_duplicates(arr):...

Help