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

 

sspiege3@schools.nyc.gov > arePermutations
prev  |  next  |  chance

arePermutations from Elevens Write a static method named arePermutations that, given two int arrays of the same length but with no duplicate elements, returns true if one array is a permutation of the other (i.e., the arrays differ only in how their contents are arranged). Otherwise, it should return false.


arePermutations([1], [1]) → true
arePermutations([1], [2]) → false
arePermutations([1, 2, 3, 4, 5], [5, 4, 3, 2, 1]) → true

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

public boolean arePermutations( int [] a, int [] b){ }

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: 205 Post-solution available

Copyright Nick Parlante 2017 - privacy