diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..067d7d5 --- /dev/null +++ b/environment.yml @@ -0,0 +1,7 @@ +name: /opt/miniconda3/envs/cs197lec2 +channels: + - defaults +dependencies: + - python=3.9 + - tqdm +prefix: /opt/miniconda3/envs/cs197lec2 diff --git a/environment_2.yml b/environment_2.yml new file mode 100644 index 0000000..067d7d5 --- /dev/null +++ b/environment_2.yml @@ -0,0 +1,7 @@ +name: /opt/miniconda3/envs/cs197lec2 +channels: + - defaults +dependencies: + - python=3.9 + - tqdm +prefix: /opt/miniconda3/envs/cs197lec2 diff --git a/number_of_ways.py b/number_of_ways.py index bebe306..0c4947e 100644 --- a/number_of_ways.py +++ b/number_of_ways.py @@ -50,7 +50,7 @@ def test_number_of_ways(): Input: startPos = 1, endPos = 2, k = 3 Output: 3 - Explanation: We can reach position 2 from 1 in exactly 3 steps + Explanation: We can reach position 2 from 1 in exactly 3 in three ways: - 1 -> 2 -> 3 -> 2. - 1 -> 2 -> 1 -> 2.