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

 

apcsaListFrequencies


Given a String input, return an ArrayList of Integer that represents the frequency of each character in the input, in the same order as the original input. Each unique character value of the input is only represented once in the output. The input "abcb" becomes an output of [1,2,1] (only 3 elements) because the output only needs to represent the 'b' with one element. This problem is considerably harder than some of the others.


apcsaListFrequencies("abc") → [1, 1, 1]
apcsaListFrequencies("abbc") → [1, 2, 1]
apcsaListFrequencies("abcb") → [1, 2, 1]

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

public ArrayList<Integer> apcsaListFrequencies(String str) { }

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