Created
January 28, 2018 21:06
-
-
Save jianminchen/4ef546939a35233ce2141994e529bf55 to your computer and use it in GitHub Desktop.
Leetcode algorithm discussion
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
input: PAYPALISHIRING, numberOfRows = 4 | |
P I N | |
A L S I G | |
Y A H R | |
P I | |
output: PINALSIGYAHRPI | |
four of queue | |
PIN <- | |
ALSIG | |
YAHR | |
PI | |
-> id -> 0, 1, 2, 3, 2, 1, 0 1, 2, 3 -> O(N) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment