Shifting Letters | LeetCode 848 | String | Facebook
Vložit
- čas přidán 7. 09. 2021
- Problem Link - leetcode.com/problems/shiftin...
Subscribe for more educational videos on data structure, algorithms and coding interviews - czcams.com/users/NareshGupta?s...
Code Repository - github.com/naresh1406/youtube...
Popular Playlists:
Top Interview Questions: • Top Interview Questions
Dynamic Programming: • Dynamic Programming - DP
Graph: • Tree 🌳
Tree: • Tree 🌳
Array: • Array
Binary Search: • Binary Search
Linked List: • Linked List
Stack: • Stack
Backtracking: • Backtracking
Trie: • Trie
Combinations and Permutations: • Combinations and Permu...
Best Time to Buy and Sell Stock: • Best Time to Buy and S...
Intervals Problems: • Intervals Problems
House Rober: • House 🏠 Robber
Follow me on -
LinkedIn - / nareshiitg
Instagram - / naresh_gupta_
Facebook - / cookcodetravel
Quora - www.quora.com/q/cookcodetravel
#Facebook #String #Arrray #Leetcode #Algorithm #DataStructure #Java #Preparation #NG #nickode #CookCodeTravel #CCT
Follow me on Instagram - naresh_gupta_ [instagram.com/naresh_gupta_]
1st solution me n-2 Q kiya sir?
brute force se start krna chaiye fir optimize karo agar possible ho to.
The solution is fine. But you did not explain the formula ((ch[i] - 'a') + sum)%26 + 'a'. Why did you first minus the char[i] with 'a'? Also, why add it back at the end?