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

 

amjadm@miamioh.edu > returnBooleanArray
prev  |  next  |  chance

Given two non-empty arrays of ints, return a new boolean array with the same length as the first array. If an element inside the first array exists inside the second array, we save true and false otherwise for that value inside the new boolean array (hint: use nested loops).


returnBooleanArray([1, 2, 3], [1, 1]) → [true, false, false]
returnBooleanArray([1], []) → [false]
returnBooleanArray([1, 2, 3, 4, 5], [1001, 4, 107, 4]) → [false, false, false, true, false]

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

public boolean[] returnBooleanArray(int[] arr1, int[] arr2) { }

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