2381. Shifting Letters II - Day 5/31 Leetcode January Challenge

  Рет қаралды 314

Programming Live with Larry

Programming Live with Larry

Күн бұрын

Пікірлер: 6
@Algorithmist
@Algorithmist 5 күн бұрын
Were you able to make the shift?
@rustamkarimov1191
@rustamkarimov1191 5 күн бұрын
Hey, good one! my solution is to cumulate them in prior [1, 0, -1] will be [1, 1, 0] and then -> current = ( current + shift ) % 26 for i, char in enumerate(res): current = ord(char) - ord('a') current = (current + moves[i]) % 26 res[i] = chr(current + ord('a')) So I believe, asymptotically they are same, but yours is faster due to fewer iterations.
@TheMarioProductionz
@TheMarioProductionz 5 күн бұрын
Learned something new today. Thanks!
@redfinance3403
@redfinance3403 5 күн бұрын
How are you accessing January 5th problem when it is January 4th at the time of post (in NYC)? 🤔 vpn or something…
@Algorithmist
@Algorithmist 5 күн бұрын
They are released at 7pm EST or so
@redfinance3403
@redfinance3403 5 күн бұрын
@@Algorithmist ah cool!
Shifting Letters II - Leetcode 2381 - Python
19:07
NeetCodeIO
Рет қаралды 11 М.
916. Word Subsets - Day 10/31 Leetcode January Challenge
20:04
Programming Live with Larry
Рет қаралды 232
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Learning C# In A Week... Otherwise I Fail University
9:04
8 patterns to solve 80% Leetcode problems
7:30
Sahil & Sarra
Рет қаралды 484 М.
#1 Revision Programming Part1 C++ semester 1     ECU
1:01:10
Mazen Ahmed
Рет қаралды 1,8 М.
How to DP! Leetcode Weekly Contest 431 (72nd) with commentary
1:09:12
Programming Live with Larry
Рет қаралды 300
1930. Unique Length-3 Palindromic Subsequences - Day 4/31 Leetcode January Challenge
10:55
3414. Maximum Score of Non-overlapping Intervals (Leetcode Hard)
57:23
Programming Live with Larry
Рет қаралды 297
70% of Programmers can't solve this LeetCode Easy Question
7:32
Problem Solving Techniques For Programming - How To Actually Get Good
27:06
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 302 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН