Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 258 Bytes

File metadata and controls

5 lines (3 loc) · 258 Bytes

Encode and Decode Strings Solution

Encode each word using the words length and a special character e.g. 4#neet. Decode by first extracting the word length, then starting at the special character plus one and ending at word length.

Time: O(m), Space: O(1)