I noticed this problem on other tasks also. When I try to compile the following snipet:
Hashtable<Integer, Integer> ht = new Hashtable<Integer, Integer>();
I got the following error message:
error: cannot find symbol: class Hashtable
I don't think leetcode support all the library of Java. There is a time that I tried to use StringTokenizer and end up with the same error message as yours. In this case, just use the HashMap<>();
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.