You are viewing a single comment's thread. Return to all comments →
my code works but it did not compile here so Can you tell me how did you enter your code and compile
def solution(arr:List[Int]): Int ={ var index = 0 for(i<-arr ){ index+=1 } index }
Seems like cookies are disabled on this browser, please enable them to open this website
List Length
You are viewing a single comment's thread. Return to all comments →
my code works but it did not compile here so Can you tell me how did you enter your code and compile
def solution(arr:List[Int]): Int ={ var index = 0 for(i<-arr ){ index+=1 } index }