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

 

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

Write a method that returns the number of in-order pairs of numbers that end in the same digit. The same number can be used in up to two pairs. Look at the test data for examples. You may not use any strings or string methods.


quiz2021_10_04_SLHL_lastDigitMatch([123498, 235, 532, 5238, 43134, 523, 1235]) → 0
quiz2021_10_04_SLHL_lastDigitMatch([1235, 534, 64, 342, 6557, 62, 155, 15, 656, 54, 351]) → 2
quiz2021_10_04_SLHL_lastDigitMatch([832, 235, 26234, 3215, 123, 13521, 523, 235, 75, 1134, 324, 643]) → 2

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

public int quiz2021_10_04_SLHL_lastDigitMatch(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: 230

Copyright Nick Parlante 2017 - privacy