Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

AssertionError: Items in the first set but not the second:

o
ozberks (580 points)
3 4 7
in HW8 by (580 points)
I only get this error in the new tests. I cannot find what might be the reason causing the error. Any help is appreciated.
161 views

3 Answers

aryanahamed (7920 points)
6 12 67
by (7.9k points)
They only added 1 new test for checking the cache. So I assume there's something wrong with the logic of your code. Please provide the log of errors.
AL1990 (28120 points)
3 6 142
by (28.1k points)
The new tests added a check on the keys. In fact in these tests the keys can contain identical characters inside such as "aca". Check that your algorithm does not mistakenly recognize anagrams when you are in this case, for example "cca" is not an anagram of "aca".
Cicchinellit (2700 points)
9 17 33
by (2.7k points)
In the first tests the letters that had to be searched where all different making the process significantly easier, new tests added more complex cases the require improvements from your original algorithm, it's normal that you pass the first set and not the second.

Here is an example of a new test and the rules applied to solve it https://q2a.di.uniroma1.it/assets/fondamenti-23-24/multichar.log?v=0