bro, what if i added the lenght of arr[element] at the starting on string and pass it., for example :: [we, are, coders] = length [2,3,6]==> String[632wearecoders] = select the first number 6 and remove last 6 values to decode ==> String[0] = 6, remove last six = coders after remove 6,, next 3 , next 2 so that array becomes empty.
Good thought. The problem is when you have more than 10 elements in a string Let lengths of the strings be 1, 18, 12 Encode chesthe mundhu 11812 ane string ostundi Ippudu decode chesthe 11, 8, 12 raavochu 1,181, 2 raavochu inkedaina raavochu so ala cheyalem. Kaani same approach lo lengths tharavatha seperator pedithe yes you can do it 1#18#12 ani store chesthav appudu. It becomes straight forward now lengths enti ani
Yes bro. These are the most asked DSA questions in interviews. There is a great chance that 2 on 3 questions you are asked in interviews is from this playlist
Words madyalo already spaces unde chance undhi Manjith. Appudu encode chesina tharuvatha decode cheyalem kadga. Space maatrame vaadalem kaani string length and space kalipi vaadochu