Infosys- TCS - ZOHO Coding Question | Count Sort - Strings | Daily Dose-10 | Tamil | code io

  Рет қаралды 10,063

code io - Tamil

code io - Tamil

Күн бұрын

Counting Sort - Strings
practice.geeks...
You are given a string arr consisting of lowercase english letters, arrange all its letters in lexicographical order using Counting Sort.
Follow us on
Instagram
code io - / code.i.o
Goms - / goms.io
Siva - / siva.io
Linkedin
Code IO - / code-io-tamil-67682b20b
Goms - / gomathinayagam-avudaik...
Siva - / sivasubramanian-a-4435...
#gfg #DailyDose #codeio

Пікірлер: 32
@SwatiHarti
@SwatiHarti 10 ай бұрын
Bro Please do videos in English or atleast English subtitles would be very helpful
@Krishna-dv6rq
@Krishna-dv6rq 5 ай бұрын
Nice explanation! I'm surprised I understood it, even tho I don't know tamil.
@Vijay-123-46
@Vijay-123-46 4 ай бұрын
Actually your way of finding the ans for length of the array is corrct because in zoho they say we dont use array. Length to find length they want to get the length manually so if '\0'is an efficient one
@gayuvj
@gayuvj 2 ай бұрын
We can use array in zoho bro
@CS-Gowtham-R
@CS-Gowtham-R 3 жыл бұрын
Super bro❤️🔥 nice explaination ❤️
@codeio
@codeio 3 жыл бұрын
Thank you so much 😀
@gamer-iw1os
@gamer-iw1os 2 жыл бұрын
//using map by which we can use it for any character ,lower or uppercase etc., ig; string countSort(string arr){ // code here map ac; for(auto c : arr) ac[c]++; string s=""; for(auto m : ac) s+=string(m.second,m.first); return s; }
@pranav2070
@pranav2070 Жыл бұрын
Whether can i use the below code to reduce the space complexity from o(n) to o(26) until printing the count public class Main { public static void main(String[] args) { String s="asedb"; int n=s.length(); char[] count = new char[26]; for(int i=0;i
@SOUNDARARUNACHLAMRM
@SOUNDARARUNACHLAMRM 8 ай бұрын
This will not work when same charachter is repeated I mean input="baacd" output="abcd" required output="aabcd"
@srinithipadma2518
@srinithipadma2518 Жыл бұрын
Why dont we use treemap and use loop to append ordered letters in new string
@gopihacks6181
@gopihacks6181 8 ай бұрын
Bro inbuilt functions use panalama bro
@wolf_gamer_100
@wolf_gamer_100 3 ай бұрын
Write and teach for freshers annae
@bipinkish
@bipinkish 2 жыл бұрын
Bro how it will be considered as O(N) ??
@AbdulRahim-fn9lc
@AbdulRahim-fn9lc 2 жыл бұрын
no it is O(k+n) in all case
@nithishkumark1644
@nithishkumark1644 3 жыл бұрын
Nalla porumaya sonna da ✨✨
@codeio
@codeio 3 жыл бұрын
😅😅🙏
@vicky-zw7zq
@vicky-zw7zq 2 жыл бұрын
3:54 char array va iruntha verum arr[i] nu mattum me kudukalam
@codeio
@codeio 2 жыл бұрын
👍🏻👍🏻
@113sudharsanr6
@113sudharsanr6 Жыл бұрын
Int array vachu count[arr[i]-'a']++ ipd
@shivaangikrish1751
@shivaangikrish1751 2 ай бұрын
class Solution { //Function to arrange all letters of a string in lexicographical //order using Counting Sort. public static String countSort(String arr) { // code here StringBuilder res = new StringBuilder(); char[] ch = arr.toCharArray(); Map map = new TreeMap(); for(char c : ch){ map.put(c,map.getOrDefault(c,0)+1); } for(Map.Entry elem : map.entrySet()){ for(int i=0; i
@aryanmalewar7789
@aryanmalewar7789 2 жыл бұрын
bro pls give english subtitles or explain in english...
@codeio
@codeio 2 жыл бұрын
we have a English channel you can check that out .... kzbin.info/door/pXDqFyeAtL5-IlO_Y548Lw
@hirithikroshan7775
@hirithikroshan7775 Жыл бұрын
Java la,intha string aa char array aa mathitu,aprm Arrays.sort pantu print pana ans vanthiru laa
@codeio
@codeio Жыл бұрын
Yeah 😉😉
@aakashpawan1542
@aakashpawan1542 3 жыл бұрын
Time Complexity O(N) dhana?
@codeio
@codeio 3 жыл бұрын
Yes, you are absolutely right
@Pradeepkumar-yr8sx
@Pradeepkumar-yr8sx 2 жыл бұрын
Bro Itha problem java la potta time limit exceeded error varuthu 😑😑😑😑
@codeio
@codeio 2 жыл бұрын
bro code mudinja share pannunga I'll try to go through it
@pravin4218
@pravin4218 2 жыл бұрын
may be O(N^2) la irukum
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 12 МЛН
Mom had to stand up for the whole family!❤️😍😁
00:39
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 41 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 125 МЛН
Learn Counting Sort Algorithm in LESS THAN 6 MINUTES!
5:59
CS Dojo
Рет қаралды 348 М.
Time and Space Complexity COMPLETE Tutorial - What is Big O? | Tamil
25:42
Solve String Programs in Java
14:37
Simply Coding
Рет қаралды 95 М.
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 12 МЛН