Skip to content

Design an algorithm which shortens a string into a shorter string. Write this function in JS. 1. It is given that input strings are alphabets only and provided in small case only (for eg starwars). This should get shortened to something smaller (output can be alphanumeric) 2. The shortening algorithm should be non-conflicting, i.e. no 2 differen…

Notifications You must be signed in to change notification settings

heysaurabhkumar/shortenString

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

shortenString

Design an algorithm which shortens a string into a shorter string. Write this function in JS.

  1. It is given that input strings are alphabets only and provided in small case only (for eg starwars). This should get shortened to something smaller (output can be alphanumeric)
  2. The shortening algorithm should be non-conflicting, i.e. no 2 different input strings should result in same shortened output string.
  3. Also write the reverse operation, if I enter a shortened string, it can decode and provide the original full string.

About

Design an algorithm which shortens a string into a shorter string. Write this function in JS. 1. It is given that input strings are alphabets only and provided in small case only (for eg starwars). This should get shortened to something smaller (output can be alphanumeric) 2. The shortening algorithm should be non-conflicting, i.e. no 2 differen…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published