- Difficulty: Hard
- Given a string S, delete as few letters as possible to obtain a word composed of at most three blocks.
- https://app.codility.com/programmers/challenges/game_of_codes_2022/
- https://app.codility.com/programmers/task/three_letters_blocks/
- Result
Good
: Correctness 100%, Performance 100%.OK
: Correctness 100%, Performance <100%.Timeout
: Correctness <100%, Performance <100%, Failed on Timeout.Fail
: Correctness <100%, Performance <100%.
- File naming convention
- Code
A
:GameOfCodes2022A.java
- etc
- Code
File | Complexity | Result | Report |
---|---|---|---|
C1 |
O(N) |
Good |
KGHNJG |
File | Complexity | Report |
---|---|---|
A1 |
O(N*2**N) or O(N*A**2) or O(N*A**3) |
ADQTPG |
B |
O(N**2) or O(N**2*A) or O(N*A**2) or O(N*A**3) |
BTQ7M4 |
File | Description | Complexity | Result | Report |
---|---|---|---|---|
A2 |
Tunning of A1 , rearrange - delete to last option |
O(N * 2**N) or O(N * A**2) or O(N * A**3) |
Timeout |
62W3J2 |
A3 |
Array version of A1 |
O(N**3) or O(N**3 * A) |
Timeout |
UWTPNC |
C2 |
Class version of C1 |
O(N) |
Good |
HP6YWE |
A
- recursive logicB
- non recursive logc