Created
July 3, 2018 17:32
-
-
Save RafaelC457ro/24b2e90d7449ccac8a4d7d818420b08b to your computer and use it in GitHub Desktop.
pseudo code url shortener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while not quit do | |
read user input into string | |
parse string to struct using lexer() | |
if struct is type of SET do | |
generate key using base62 using struct data | |
insert key data into map | |
prinf "success" | |
else if struct is type of GET do | |
if find key in array do | |
prinf value | |
else | |
print "not found" | |
endif | |
else | |
print "not valid command" | |
endif | |
endwhile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment