Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Codility Solutions

Python Codility License

A curated library of my Codility solutions with official reports — keeping Python fundamentals sharp alongside AI engineering.


📊 Latest Results (Sep 2026)

Problem Score Tests Time Solution
FrogJmp 100% 10/10 ~6 min src/frog_jmp.py
PermMissingElem (v1) 100% 11/11 ~4 min src/perm_missing_elem.py
PermMissingElem (v2) 100% 11/11 ~4 min src/perm_missing_elem.py

32 passed test cases — zero failures. 🎯


📁 Repository Structure

python-codility-solutions/
├── README.md                          # This file
├── .gitignore                         # Excludes system files
├── src/                               # All Python solution files
│   ├── frog_jmp.py                    # FrogJmp solution
│   ├── perm_missing_elem.py           # PermMissingElem solution
│   └── (35+ more solutions)
├── docs/                              # Documentation & historical reports
│   ├── Test results - Codility*.pdf   # Official Codility reports
│   └── Test results - Codility*.png   # Screenshots
├── results/                           # Latest PDF reports
│   ├── frog_jmp/
│   │   └── FrogJmp_100_percent.pdf
│   └── perm_missing_elem/
│       ├── PermMissingElem_Submission_1_100_percent.pdf
│       └── PermMissingElem_Submission_2_100_percent.pdf
├── scripts/                           # Shell scripts (if any)
└── solutions/                         # Solution explanations (coming soon)

🚀 Run Solutions

# FrogJmp
python src/frog_jmp.py

# PermMissingElem
python src/perm_missing_elem.py

# Run all solutions
for f in src/*.py; do python "$f"; done

📄 View Latest PDF Reports

# Open latest Codility reports
open results/frog_jmp/FrogJmp_100_percent.pdf
open results/perm_missing_elem/PermMissingElem_Submission_1_100_percent.pdf
open results/perm_missing_elem/PermMissingElem_Submission_2_100_percent.pdf

# View all historical reports
open docs/

🎯 Key Insights

FrogJmp

  • Problem: Count minimal jumps from X to Y
  • Solution: Use integer division instead of simulation
  • Time Complexity: O(1) — constant time
  • Space Complexity: O(1)

PermMissingElem

  • Problem: Find missing element in a permutation
  • Solution: Sort + binary search
  • Time Complexity: O(N log N)
  • Space Complexity: O(1)

📚 About Codility

Codility problems test algorithmic thinking. Key challenges:

  • Efficiency: Aim for O(1), O(n), or O(n log n)
  • Edge cases: Handle empty inputs, single elements, large numbers
  • Minimalist code: Avoid nested loops and unnecessary objects
  • Quick exits: Use return and break to exit early

🏆 Achievements

  • 32 passed test cases on latest run
  • 0 failures
  • 100% scores on all recent submissions
  • Consistently under 6 minutes per problem

🔗 Links


Keeping Python fundamentals sharp alongside AI engineering. 🐍🚀

About

Time complexity optimization in Python

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages