Back to Lessons

Codility Training - Complete 8-Week Lessons

Codility Training - Complete 8-Week Lessons

Comprehensive lessons for your 8-week Codility preparation journey!


šŸ“š Complete Lesson Files

āœ… Week 1: Foundations (TypeScript + Basic DSA)

File: week1-foundations.md

Topics: - Day 1: TypeScript basics (functions, arrays, loops) - Day 2: Big-O notation (O(1), O(n), O(n²), O(log n)) - Days 3-4: Array manipulation - Day 5: Edge case handling - Day 6: Review and practice

Challenges: BinaryGap, OddOccurrencesInArray, CyclicRotation, TapeEquilibrium, PermMissingElem


āœ… Week 2: Counting, Prefix Sum & Hash Maps

File: week2-counting-prefix-hashmaps.md

Topics: - Days 8-9: Counting elements (boolean arrays vs hash maps) - Days 10-11: Prefix sum technique ⭐ VERY IMPORTANT! - Day 12: Hash map patterns - Day 14: Mock Test 1 (45 min, target 70%+)

Challenges: PermCheck, FrogJmp, MissingInteger, FrogRiverOne, GenomicRangeQuery


āœ… Week 3: Sorting, Greedy & Basic Math

File: week3-sorting-greedy-math.md

Topics: - Days 15-16: Sorting algorithms and patterns - Day 17: Greedy algorithms - Day 18: Simple math in DSA - Day 19: Extra sorting practice - Day 21: Mock Test 2 (60 min, target 75%+)

Challenges: Distinct, MaxProductOfThree, Triangle, TieRopes, CountDiv, PassingCars


āœ… Week 4: Stacks, Queues, Leaders ⭐ MAJOR WEEK!

File: week4-stacks-queues-leaders.md

Topics: - Day 22: Stack fundamentals - Day 23: Stack simulation (Fish, StoneWall) - Day 24: Leaders & Dominator (Boyer-Moore) - Days 25-27: Review and advanced practice - Day 28: Mock Test 3 (70 min, target 80%+)

Challenges: Brackets, Fish, StoneWall ⭐, Dominator, EquiLeader

Why Important: Stack problems appear in 40%+ of Codility tests!


āœ… Week 5: Maximum Slices + DP Basics

File: week5-slices-dp.md

Topics: - Day 29: Kadane's algorithm ⭐ - Day 30: Max double slice (tricky!) - Day 31: DP fundamentals - Day 32: DP practice - Day 35: Mock Test 4 (75 min, target 80-85%+)

Challenges: MaxSliceSum, MaxProfit, MaxDoubleSliceSum, NumberSolitaire

Key Pattern: Kadane's algorithm is essential!


āœ… Week 6: Binary Search, Peaks, Flags, Sieve

File: week6-binary-search-peaks-sieve.md

Topics: - Day 36: Binary search (on array, on answer) - Day 37: Sieve of Eratosthenes - Day 38: Peaks - Day 39: Flags ⭐ VERY COMMON! - Day 40: Rectangle / Geometry - Day 42: Mock Test 5 (75-90 min, target 85%+)

Challenges: MinMaxDivision, CountFactors, CountSemiprimes, Peaks, Flags, ChocolatesByNumbers


āœ… Week 7: Reinforcement + Review

File: week7-review-practice.md

Topics: - Days 43-44: Array medium review (LeetCode) - Day 45: Stack & leader review - Day 46: Binary search review - Day 47: Prefix sum review - Day 48: Mini Mock Test (60 min, target 90%+) - Day 49: Free review day

Focus: Fill gaps, increase speed, build confidence


āœ… Week 8: Final Codility Simulation Week

File: week8-final-mocks.md

Topics: - Day 51: Full Mock Test A (90 min) - Day 52: Review results - Day 53: Full Mock Test B (90 min) - Day 54: Review results - Day 55: Full Mock Test C (90 min) - Day 56: Final self-assessment

Goal: 85-90% correctness + optimized performance


šŸŽÆ Quick Pattern Reference

Most Important Patterns

Pattern When to Use Time Lesson
Prefix Sum Range queries O(n) build, O(1) query Week 2
Stack Matching, simulation O(n) Week 4
Kadane's Max subarray O(n) Week 5
Boyer-Moore Majority element O(n) Week 4
Binary Search Sorted data, optimization O(log n) Week 6
Greedy Local → global optimum Varies Week 3
Two Pointers Pairs, subarrays O(n) Week 1, 7
Sieve Prime numbers O(n log log n) Week 6

Critical Problems to Master

šŸ”„ Must Know: 1. GenomicRangeQuery - Multiple prefix sums (Week 2) 2. StoneWall - Stack simulation (Week 4) ⭐ VERY COMMON 3. Fish - Stack with conditions (Week 4) 4. Flags - Greedy + optimization (Week 6) ⭐ VERY COMMON 5. MaxDoubleSliceSum - Two DP arrays (Week 5) 6. EquiLeader - Boyer-Moore application (Week 4)


šŸ“Š Learning Path

Week by Week Goals

Week 1: Foundation - āœ… Master TypeScript basics - āœ… Understand Big-O - āœ… Handle edge cases

Week 2: Core Techniques - āœ… Counting patterns - āœ… Prefix sums (CRITICAL!) - āœ… Hash maps - šŸŽÆ Target: 70%+ on mock test

Week 3: Algorithms - āœ… Sorting strategies - āœ… Greedy thinking - āœ… Math optimization - šŸŽÆ Target: 75%+ on mock test

Week 4: Advanced Structures - āœ… Stack mastery - āœ… Queue operations - āœ… Boyer-Moore algorithm - šŸŽÆ Target: 80%+ on mock test

Week 5: Dynamic Programming - āœ… Kadane's algorithm - āœ… DP fundamentals - āœ… State transitions - šŸŽÆ Target: 80-85%+ on mock test

Week 6: Optimization - āœ… Binary search patterns - āœ… Prime numbers (Sieve) - āœ… Complex greedy (Flags, Peaks) - šŸŽÆ Target: 85%+ on mock test

Week 7: Consolidation - āœ… Review all patterns - āœ… Increase speed - āœ… Fill gaps - šŸŽÆ Target: 90%+ on easier, 75%+ on hard

Week 8: Final Preparation - āœ… Full-length simulations - āœ… Time management - āœ… Confidence building - šŸŽÆ Goal: 85-90% overall


šŸ’” Study Tips

How to Use These Lessons

Daily Routine: 1. Read the lesson (20-30 min) - Understand concepts thoroughly - Take notes on patterns

  1. Practice challenges (60-90 min)
  2. Try solving yourself first
  3. Compare with provided solutions
  4. Understand WHY solution works

  5. Track progress (10 min)

  6. Use the web app
  7. Mark completed tasks
  8. Note difficulties

  9. Review (10-15 min)

  10. What did you learn?
  11. What was difficult?
  12. What to practice more?

Maximizing Learning

Do: - āœ… Solve problems yourself before looking at solutions - āœ… Understand the pattern, not just memorize code - āœ… Practice edge cases - āœ… Time yourself - āœ… Review mistakes

Don't: - āŒ Just copy solutions without understanding - āŒ Skip the "easy" problems - āŒ Ignore time complexity - āŒ Forget to test edge cases - āŒ Give up when stuck (take break, come back)


šŸš€ Success Metrics

By End of Week 4

  • Can solve easy problems in < 5 minutes
  • Can solve medium problems in < 15 minutes
  • Know basic patterns (prefix sum, stack, counting)
  • Comfortable with TypeScript

By End of Week 6

  • Can solve most medium problems in < 12 minutes
  • Can attempt hard problems
  • Recognize patterns immediately
  • Handle edge cases automatically

By End of Week 8

  • Can solve easy problems in < 3 minutes
  • Can solve medium problems in < 10 minutes
  • Can solve hard problems in < 20 minutes
  • Ready for 85-90% on real test!

šŸ“– Additional Resources

Codility Resources

Practice Platforms

TypeScript


šŸŽ“ Final Words

You have everything you need: - 8 weeks of structured lessons āœ… - 50+ solved challenges āœ… - Complete pattern reference āœ… - Mock tests for practice āœ…

Your success formula:

Consistent Practice
+ Pattern Recognition
+ Time Management
+ Edge Case Handling
= 85-90% Success Rate! šŸŽÆ

Remember: - Start with Week 1, follow the order - Don't rush - understanding > speed initially - Speed comes with practice - Use the web app to track progress - Review difficult problems multiple times


šŸ“ž Need Help?

If you're stuck: 1. Re-read the lesson explanation 2. Trace through the example step-by-step 3. Try a simpler version of the problem 4. Review the pattern from earlier weeks 5. Take a break and come back fresh

You've got this! šŸ’Ŗ

Start your journey with Week 1: Foundations →


Last Updated: 2025 Total Lessons: 8 weeks Total Challenges: 50+ Goal: 85-90% Codility Test Success! šŸš€