You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the type version of Array.indexOf, indexOf<T, U> takes an Array T, any U and returns the index of the first U in Array T.
typeRes=IndexOf<[1,2,3],2>;// expected to be 1typeRes1=IndexOf<[2,6,3,8,4,1,7,3,9],3>;// expected to be 2typeRes2=IndexOf<[0,0,0],2>;// expected to be -1
5153 - IndexOf
by Pineapple (@pineapple0919) #medium #array
Question
Implement the type version of Array.indexOf, indexOf<T, U> takes an Array T, any U and returns the index of the first U in Array T.
...
The text was updated successfully, but these errors were encountered: