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

 

jebbert@volusia.k12.fl.us > test2022_10_13_SLHL_arrayPalindrome
prev  |  next  |  chance

Write a method that returns 'true' if the array 'nums' is a palindrome, 'false' otherwise. A palindrome is a word that is spelled the same way forwards and backwards. An array palindrome is an array that has the same elements in the array forwards and backwards. Looks at the test data for examples.


test2022_10_13_SLHL_arrayPalindrome([4, 55, 2, 41, 6, 41, 2, 55, 4]) → true
test2022_10_13_SLHL_arrayPalindrome([5, 8, 2, 1, -12, -50, 50, -12, 1, 2, 8, 5]) → false
test2022_10_13_SLHL_arrayPalindrome([6]) → true

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

public boolean test2022_10_13_SLHL_arrayPalindrome(int[] nums) { }

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