tejak123 Posted July 25, 2014 Report Posted July 25, 2014 nenu ekkada thappu chesaaano cheppandi boss... eee function submit chesthey mee peru cheppu oka Case corona thaagutha... function( array<string> , string) { for Example: function (a[], "rajesh") step 1: Remove all "rajesh" elements if there are any in array a[] step 2: then , among remaining elements , We need top 5 elements depending on their repititions } step 1 working.. step 2 lo error undhi... public List<String> evaluate(ArrayList<String> list,Text text) { String product= text.toString(); List<String> productList = new ArrayList<String>(); for(String str : list) { if(!(product.equals(str))) { productList.add(str); } } return productList; } public ArrayList<String> findTop(ArrayList<String> list) { Map<String, Integer> occurrences = new HashMap<String, Integer>(); for ( String word : splitWords ) { Integer oldCount = occurrences.get(word); if ( oldCount == null ) { oldCount = 0; } occurrences.put(word, oldCount + 1); } }
tejak123 Posted July 25, 2014 Author Report Posted July 25, 2014 nenu morning nunchi kottting deeeni kosam.. manchi expert digithe 10 minutes lo ayipothadhi
god father Posted July 25, 2014 Report Posted July 25, 2014 nenu morning nunchi kottting deeeni kosam.. manchi expert digithe 10 minutes lo ayipothadhi hashmap vadi try cheyyaka poyava 2nd step kosam once a hashmap create ayyaka ee link choodu
tejak123 Posted July 25, 2014 Author Report Posted July 25, 2014 hashmap vadi try cheyyaka poyava 2nd step kosam once a hashmap create ayyaka ee link choodu ..///// link .?
chandra916 Posted July 25, 2014 Report Posted July 25, 2014 calling CJ ani oka thread eyyi...lekapothe pakka db lo CJ vuntaadu...oka callin thread eyyi akkada
god father Posted July 25, 2014 Report Posted July 25, 2014 hashmap vadi try cheyyaka poyava 2nd step kosam once a hashmap create ayyaka ee link choodu ..///// link .? http://javasimplestuff.blogspot.in/2013/12/java-sort-hashmap-based-on-values.html
tejak123 Posted July 25, 2014 Author Report Posted July 25, 2014 link .? http://javasimplestu...-on-values.html.// Raledhu bro
god father Posted July 25, 2014 Report Posted July 25, 2014 http://javasimplestu...-on-values.html.// Raledhu bro emi raledu?!! naku actually ne requirement sarigga artham kaledu but correct me if i understood wrong. nee list lo unna words ni evi maximum repeat ayyayo 1st ravali and there on next maximum etc anthe na?!!! take a hashmap put the string in key counter in value. then follow the link and you do not need to use the comparator as int is comparable
tejak123 Posted July 25, 2014 Author Report Posted July 25, 2014 emi raledu?!! naku actually ne requirement sarigga artham kaledu but correct me if i understood wrong. nee list lo unna words ni evi maximum repeat ayyayo 1st ravali and there on next maximum etc anthe na?!!! take a hashmap put the string in key counter in value. then follow the link and you do not need to use the comparator as int is comparable... you got it correct .. this function has two arguments.. one string and one array Step 1: first ah array lo nunchi ..ichina string theeeseyyali.. ITS DONE AND WORKING tharuvatha .. migatha vaatilo max 5 repititions ... IKKADA PROB
god father Posted July 25, 2014 Report Posted July 25, 2014 emi raledu?!! naku actually ne requirement sarigga artham kaledu but correct me if i understood wrong. nee list lo unna words ni evi maximum repeat ayyayo 1st ravali and there on next maximum etc anthe na?!!! take a hashmap put the string in key counter in value. then follow the link and you do not need to use the comparator as int is comparable... you got it correct .. this function has two arguments.. one string and one array Step 1: first ah array lo nunchi ..ichina string theeeseyyali.. ITS DONE AND WORKING tharuvatha .. migatha vaatilo max 5 repititions ... IKKADA PROB sare aithe prethi word ki counter pettuko word encounter ayinappudalla dani counter increment chesi hashmap lo pettu antha ayi poyaka list iterate chese tappudu hashmap nunchi dani counter techuko if >5 aithe delete chesi counter update chesuko hashmap lo and a word ni list lo nunchi delete cheyyi
fake_Bezawada Posted July 25, 2014 Report Posted July 25, 2014 ah blog nadheeeeee :P requirement naku sarigga ardam kala but cheppe lepedham tondargaa
Recommended Posts