🚀 https://neetcode.io/ – A better way to prepare for Coding Interviews
🧑💼 LinkedIn: https://www.linkedin.com/in/navdeep-singh-3aaa14161/
🐦 Twitter: https://twitter.com/neetcode1
⭐ BLIND-75 PLAYLIST: https://www.youtube.com/watch?v=KLlXCFG5TnA&list=PLot-Xpze53ldVwtstag2TL4HQhAnC8ATf
Problem Link: https://leetcode.com/problems/shifting-letters-ii/description/
0:00 – Read the problem
0:30 – Drawing Explanation
13:34 – Coding Explanation
leetcode 2381
#neetcode #leetcode #python



コメント
Question about 18:44 . If there are many shifts to the left, then theoretically the diff could be a very small negative number like -27, right? In that case, if we simply add 26 to it, then try to mod it in a non-Python language, wouldn’t we still wind up with a negative number? Instead of simply adding 26 once, should we continuously add 26 until the sum is positive, and then do the modulus operator?
This question should be categorized as “Hard”. I bet a few people can come up with this solution without any clues
brilliant as always