Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 committed Oct 23, 2023
1 parent 03c86cf commit 8994842
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
|A1| [Ready, Go (Part 1)](https://www.facebook.com/codingcompetitions/hacker-cup/2023/round-2/problems/A1)| [Python3](./Round%202/ready_go_part_1.py3) | _O(R * C)_ | _O(R * C)_ | Easy | | BFS |
|A2| [Ready, Go (Part 2)](https://www.facebook.com/codingcompetitions/hacker-cup/2023/round-2/problems/A2)| [Python3](./Round%202/ready_go_part_2.py3) | _O(R * C)_ | _O(R * C)_ | Easy | | BFS, DP |
|B| [Meta Game](https://www.facebook.com/codingcompetitions/hacker-cup/2023/round-2/problems/B)| [Python3](./Round%202/meta_game.py3) | _O(N)_ | _O(1)_ | Easy | | Array |
|C| [Wiki Race](https://www.facebook.com/codingcompetitions/hacker-cup/2023/round-2/problems/C)| [Python3](./Round%202/wiki_race.py3) [Python3](./Round%202/wiki_race2.py3) | _O(N + M * MAX_S)_ | _O(N + M * MAX_S)_ | Medium | | DFS, Freq Table, Tree DP |
|C| [Wiki Race](https://www.facebook.com/codingcompetitions/hacker-cup/2023/round-2/problems/C)| [Python3](./Round%202/wiki_race.py3) [Python3](./Round%202/wiki_race2.py3) | _O(N + SUM_M * MAX_LEN_S)_ | _O(N + SUM_M * MAX_LEN_S)_ | Medium | | DFS, Freq Table, Tree DP |
|D| [Tower Rush](https://www.facebook.com/codingcompetitions/hacker-cup/2023/round-2/problems/D)| [Python3](./Round%202/tower_rush.py3) | precompute: _O(MAX_N + max(MAX_D, MAX_H) * log(max(MAX_D, MAX_H)))_<br>runtime: _O(N + (max_h) * log(max_h))_ | _O(MAX_N + max(MAX_D, MAX_H) * log(max(MAX_D, MAX_H)))_ | Hard | | Number Theory, `Bézout's Identity`, Combinatorics, Inclusion-Exclusion Principle, `Möbius Function`, `Linear Sieve of Eratosthenes` |
4 changes: 2 additions & 2 deletions Round 2/wiki_race.py3
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Meta Hacker Cup 2023 Round 2 - Problem C. Wiki Race
# https://www.facebook.com/codingcompetitions/hacker-cup/2023/round-2/problems/C
#
# Time: O(N + M * MAX_S), M = sum(M[i] for i in range(N)), MAX_S = O(10)
# Space: O(N + M * MAX_S)
# Time: O(N + SUM_M * MAX_LEN_S), SUM_M = sum(M), MAX_LEN_S = O(10)
# Space: O(N + SUM_M * MAX_LEN_S)
#

def wiki_race():
Expand Down
4 changes: 2 additions & 2 deletions Round 2/wiki_race2.py3
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Meta Hacker Cup 2023 Round 2 - Problem C. Wiki Race
# https://www.facebook.com/codingcompetitions/hacker-cup/2023/round-2/problems/C
#
# Time: O(N + M * MAX_S + M * logL), M = sum(M[i] for i in range(N)), L = number of leaves, MAX_S = O(10)
# Space: O(N + M * MAX_S)
# Time: O(N + SUM_M * MAX_LEN_S + SUM_M * logL), SUM_M = sum(M), L = number of leaves, MAX_LEN_S = O(10)
# Space: O(N + SUM_M * MAX_LEN_S)
#

from collections import Counter
Expand Down

0 comments on commit 8994842

Please sign in to comment.