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

 

array_negatives


Given an integer array "a", return the number of negative values in it.


array_negatives([1, 2, 3]) → 0
array_negatives([-5, 0, 5]) → 1
array_negatives([-1, -2, -3, 1, 2, 3]) → 3

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

public int array_negatives(int[] a) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy