Create a bug report to help us improve our content -
Your email registered on BackToBackSWE :
cktnhat1234@gmail.com
Category of the bug :
[ ] Question
[ ] Solution
[ ] Language
the IDE
Description of the bug :
The IDE just keeps spinning and doesn't allow me to submit.
Code you used for Submit/Run operation :
import math
class Solution:
def distanceOfClosestRepeatedEntries(self, sentence):
'''
:type sentence: list of str
:rtype: int
'''
dict = {}
res = math.inf
for i in range(len(sentence)):
if sentence[i] not in dict:
dict[sentence[i]] = i
else:
newDiff = i - dict[sentence[i]]
res = min(res, newDiff)
dict[sentence[i]] = i
return res
Back To Back SWE
Create a bug report to help us improve our content -
Your email registered on BackToBackSWE :
cktnhat1234@gmail.com
Category of the bug :
Description of the bug :
The IDE just keeps spinning and doesn't allow me to submit.
Code you used for Submit/Run operation :
Language used for code :
Python
Expected behavior :
It allows me to submit.
Screenshots :
Additional context :