https://github.com/siakhooi/codility-gamers-2021
Codility Challenge: Gamer's 2021 (Hard)
https://github.com/siakhooi/codility-gamers-2021
codility codility-challenges java junit maven
Last synced: 2 months ago
JSON representation
Codility Challenge: Gamer's 2021 (Hard)
- Host: GitHub
- URL: https://github.com/siakhooi/codility-gamers-2021
- Owner: siakhooi
- Created: 2021-11-19T09:56:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-19T11:46:50.000Z (over 4 years ago)
- Last Synced: 2025-06-04T08:23:11.244Z (about 1 year ago)
- Topics: codility, codility-challenges, java, junit, maven
- Language: Java
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Codility Challenge: Gamer's 2021
## FillTheGaps
- Difficulty: Hard
- Given a string consisting of characters 'a', 'b' and/or '?', replace each '?' with 'a' or 'b' so that the longest fragment of the resulting string consisting of equal letters is as short as possible.
-
-
## Versions
- Result
- `Good`: Correctness 100%, Performance 100%.
- `OK`: Correctness 100%, Performance <100%.
- `Fail`: Correctness <100%, Performance <100%.
- File naming convention
- Code `A`: `Gamers2021A.java`
- etc
### Gold Award
| File | Complexity | Result | Report |
| ---- | ----------------------- | ------ | --------------------------------------------------------------------------------- |
| `A` | `O(N * log(N)) or O(N)` | `Good` | [N7PTWR](https://app.codility.com/cert/view/certN7PTWR-SA8JKZ48PXEHSSSS/details/) |
### Other
| File | Complexity | Result | Report |
| ---- | ----------------------- | ------ | --------------------------------------------------------------------------------- |
| `B` | `O(N * log(N)) or O(N)` | `Good` | [6WTXMU](https://app.codility.com/demo/results/training6WTXMU-629/) |
- Solution provided by Codility is written in Python and using `yield` command which not available in Java. So no java version implemented as it can't be compared fairly.
- Both `A`, `B` and Codility solutions are same concepts.
- `A` although earn a Gold award, but actually contains a bug, which failed the following scenario:
- input: '`aaaa?bbb?aaa?bbb?aaa?bbb?aaaa`', expected `5` (the program returns 4)
- `B` is the bug fix version of `A`