This won't work when we have "-encodeStr" in our list.
@Chempox5 ай бұрын
This one is a simple solutions, but it might not work in a interview. Depends on the company, but some don't like you to use the js functions. But if they let you use this solution, don't make it harder for you. Good video btw.
@100x_Developer Жыл бұрын
This is so helpful. I 've been trying to solve this one for some time now.. it's amazing that the video with the shortest duration has done the job.. Thank you a lot.
@General_Aladeen Жыл бұрын
you made it so easy man
@mariselvanАй бұрын
And that's not what the interviewer will expect man. If it's too easy it'll go into easy. Not medium
@ogundipepelumi49272 жыл бұрын
Thank you for the explanatory video.. You made it look very easy.
@AlgoJS2 жыл бұрын
No problem Ogundipe!
@accidentalengineering Жыл бұрын
What's wrong with JSON?
@shamus030 Жыл бұрын
The problem statement says you are not allowed to use built-in encoding/decoding functions. So JSON would be a valid solution, but you would have to write your own encoder/decoder!
@MrNaberz Жыл бұрын
This is wrong
@Deepa08112 жыл бұрын
Super simple. Thanks ! This would still be Time complexity of O(N) and constant space. Correct? We need to add a non ASCII (such as +,-, # etc) to the join string as a delimiter, is it?
@AlgoJS2 жыл бұрын
Correct
@Rebants Жыл бұрын
Need length of string + delimiter. [hello, world] -> [5_hello5_world] Decode reads numbers until _ and then reads that many more for next string*, etc.