My code didn't get accepted because the 2nd note constraint was not obeyed when checking my submissions
Judging mistake

from collections import Counter as ctr class Solution(object): def getDeg(self,nums,start,end): ct = {} for i in xrange(start,end): ct[nums[i]]=ct.get(nums[i],0)+ 1 return max(ct.values()+[0]) def find(self,nums,val,rev=False): it = xrange(len(nums)1,1,1) if rev else xrange(len(nums)) for i in it: if nums[i]==val: return i return 1 def findShortestSubArray(self, nums): """ :type nums: List[int] :rtype: int """ n =len(nums) freqs = {} first,last = [1]*50000, [1]*50000 for i,v in enumerate(nums): if first[v]<0: first[v]=i freqs[v]=1 else: freqs[v]+=1 last[v] = i d= max(freqs.values()) mvd = set([i for i in freqs if freqs[i]==d]) ans =n for v in mvd: if first[v]>=0: ans = min(ans,1+last[v]first[v]) return ans ```

@hliu94 Me too i had two WA because of the second constraint: 0<= nums[i] <= 49999, then I supposed that the right constraint was 0 <= abs(nums[i]) <= 49999. Fortunately my solution supposing that nums[i] is 32bit integer gave accepted

@hliu94 @balabasik Extremely sorry about this. The inputs have been changed to be valid, and the question will be rejudged.
@balabasik Some solutions use HashMap instead of array. For an example, please visit https://leetcode.com/articles/degreeofanarray/ .

@1337c0d3r @awice how about this post
https://discuss.leetcode.com/topic/107101/superstandardbacktrackingsolution/9
Partition to K Equal Sum Subsets
lacks some case.

@1337c0d3r @awice thanks for the effort guys.
Pity though that precious 10 minutes were wasted for rewriting the code :)