File tree Expand file tree Collapse file tree 1 file changed +45
-3
lines changed
src/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps Expand file tree Collapse file tree 1 file changed +45
-3
lines changed Original file line number Diff line number Diff line change 15
15
[2 , 5 ],
16
16
[3 , 2 ]
17
17
],
18
- 'answer' : [0 , 1 ]
18
+ 'expected' : [0 , 1 ]
19
+ },
20
+ {
21
+ 'title' : 'Sample Test Case 2' ,
22
+ 'input' : [
23
+ [1 , 3 ],
24
+ [2 , 3 ],
25
+ [3 , 2 ],
26
+ [1 , 4 ],
27
+ [1 , 5 ],
28
+ [1 , 5 ],
29
+ [1 , 4 ],
30
+ [3 , 2 ],
31
+ [2 , 4 ],
32
+ [3 , 2 ]
33
+ ],
34
+ 'expected' : [0 , 1 , 1 ]
35
+ },
36
+ {
37
+ 'title' : 'Sample Test Case 3' ,
38
+ 'input' : [
39
+ [1 , 3 ],
40
+ [1 , 38 ],
41
+ [2 , 1 ],
42
+ [1 , 16 ],
43
+ [2 , 1 ],
44
+ [2 , 2 ],
45
+ [1 , 64 ],
46
+ [1 , 84 ],
47
+ [3 , 1 ],
48
+ [1 , 100 ],
49
+ [1 , 10 ],
50
+ [2 , 2 ],
51
+ [2 , 1 ],
52
+ [1 , 67 ],
53
+ [2 , 2 ],
54
+ [3 , 1 ],
55
+ [1 , 99 ],
56
+ [1 , 32 ],
57
+ [1 , 58 ],
58
+ [3 , 2 ]
59
+ ],
60
+ 'expected' : [1 , 1 , 0 ]
19
61
}
20
62
]
21
63
@@ -27,9 +69,9 @@ def test_freq_query(self):
27
69
for _ , _tt in enumerate (TEST_CASES ):
28
70
29
71
self .assertEqual (
30
- freq_query (_tt ['input' ]), _tt ['answer ' ],
72
+ freq_query (_tt ['input' ]), _tt ['expected ' ],
31
73
f"{ _ } | freq_query({ _tt ['input' ]} ) must be "
32
- f"=> { _tt ['answer ' ]} " )
74
+ f"=> { _tt ['expected ' ]} " )
33
75
34
76
def test_freq_query_edge_case (self ):
35
77
You can’t perform that action at this time.
0 commit comments