This repository contains solutions for Codility test problems.
Three different problems are addressed:
- Tournament Simulation:
File:
a. tournament_simulation.py
b. tournament_simulation.js
These two files are for the task 1 test on the codility test, written in both python and JavaScript
Function: solution(skills) Description: Simulates a tournament among players with given skills. It returns the number of rounds each player survives.
- Unique Time Combinations:
File:
a. unique_time_combinations.py
b. unique_time_combinations.js
These two files are for the task 2 test on the codility test, written in both python and JavaScript
Function: solution(A, B, C, D) Description: Given four digits, the function calculates the number of unique time combinations that can be formed using these digits as hours and minutes.
- Grid Movement:
File:
a. grid_movement.py
b. grid_movement.js
These two files are for the task 3 test on the codility test, both are written in js and python
Function: solution(S) Description: Simulates movements on a grid based on input string S containing directional moves ("<", ">", "^", "v"). It returns the count of all moves, including invalid ones.