We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Sequence Equation
Sequence Equation
Sort by
recency
|
1526 Discussions
|
Please Login in order to post a comment
java 8
using reduce in JS/Javascript:-
n=int(input())
m=list(map(int,input().split())) m.insert(0,0)
for i in range(1,n+1): a=m[i] b=m.index(a) c=m.index(b) d=m.index(c) print(d)
TS solution O(n):
here is my c# solution ,