function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
List<integer> intvales = new List<integer>{1,2,3,4,3,2,1}; set<integer> uniquevalues = new set<integer>(intvales); system.debug('uniquevalues=='+uniquevalues); Map<integer,Integer> RepeatedCount = new Map<integer,Integer>(); for(integer key : intvales) { if(!RepeatedCount.containsKey(key)){ RepeatedCount.put(key,0); } Integer currentInt=RepeatedCount .get(key)+1; RepeatedCount.put(key,currentInt); } system.debug('Repeated Values count=='+RepeatedCount);
List<integer> intvales = new List<integer>{1,2,3,4,3,2,1}; set<integer> uniquevalues = new set<integer>(intvales); system.debug('uniquevalues=='+uniquevalues); Map<integer,Integer> RepeatedCount = new Map<integer,Integer>(); for(integer key : intvales) { if(!RepeatedCount.containsKey(key)){ RepeatedCount.put(key,0); } Integer currentInt=elCount.get(key)+1; RepeatedCount.put(key,currentInt); } system.debug('Repeated Values count=='+RepeatedCount);
try with below.
If this helps, Please mark it as best answer.
Thanks!!
All Answers
try with below in devconsole.
If this helps, Please mark it as best answer.
Thanks!!
try with below.
If this helps, Please mark it as best answer.
Thanks!!