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.
Intro to Tutorial Challenges
Intro to Tutorial Challenges
+ 11 comments Array is not required , this will do it for(i=0;i < no;i++) {
scanf("%d",&input); if(input == key) printf("%d",i); }
+ 0 comments Its a very basic question and I dont know why they have given 30 points. only 3 lines of code is enough to solve
+ 3 comments Here is Python 3 solution from my HackerrankPractice repository:
v = int(input()) n = int(input()) arr = list(map(int, input().split())) i = 0 while arr[i] != v: i += 1 print(i)
Feel free to ask if you have any questions :)
+ 1 comment My solution in Python3:
def introTutorial(V, arr): return arr.index(V)
+ 1 comment Javascript solution:
return arr.indexOf(V);
Load more conversations
Sort 337 Discussions, By:
Please Login in order to post a comment