id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

dario.sonego@gmail.com esercicci_array > cercaPrimaPos
prev  |  next  |  chance

Dato un vettore v ed un numero da cercare q, determinare la prima posizione dove appare q. Se il vettore non contiene il numero cercato, la funzione restituisce -1.


cercaPrimaPos([12, 55, 4, 55], 12) → 0
cercaPrimaPos([12, 55, 4, 55], 33) → -1
cercaPrimaPos([12, 55, 4, 55], 55) → 1

...Save, Compile, Run (ctrl-enter)

int cercaPrimaPos(int[] v, int q) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 250

Copyright Nick Parlante 2017 - privacy