@greghogg5: This Apple Coding Question is Awesome! Leetcode 3019 - Number of Changing Keys Crack big tech at algomap.io! #coding #leetcode #programming #interview
wouldn't it be better to make the whole thing lowercase once, and work with that? Now you're lowercasing each letter twice
2025-09-26 19:33:38
16
yotam :
in python its a one liner
2025-09-26 18:24:50
2
No :
I have a challenge too! Name a real world application for this scenario.
2025-09-26 23:27:12
20
Tredegar Iron Works :
Coding it is easy, but technically you need to know the language. Also, what’s a “character”? Is it a glyph, or a symbol? In German, is an ess-tsett one character or two?
2025-09-27 17:30:01
0
discountedsteak :
Last used is not updated
2025-09-26 15:50:19
34
Lee More Touch ༽ :
If you haven't a lower or similar function you might create a mapping
2025-09-27 12:33:41
0
im_no_one881 :
just use hash map for everything,
2025-09-26 19:26:45
2
X41 :
I thought there was gonna be some very optimised way to do it in c coming, not a basic python solution 😭
2025-09-27 22:50:19
0
Amberto :
now in haskell
2025-09-27 00:09:00
0
Anders Toft :
Your code is wrong and unoptimized. You don't update last_used and you have repeat lowering of the same values
2025-09-27 11:41:32
12
yêu em hao gầy :
I was expect a better solve that optimized time and space complexity than a single for loop
2025-09-26 16:48:05
1
TK :
this is so easy
2025-09-26 20:07:24
2
chrismottram590 :
You need to validate the string is at least 2 chars long, then just loop looking to see if the char before the current loop pos char is different. No need to record last used char.
2025-09-28 11:29:49
0
Ryan :
The proper answer is to avoid that and question the entire philosophy of the function call in the first place then do nothing about it
2025-09-26 18:23:55
3
Brangdonj :
Unicorn support? Does f followed by fi ligature count as a change, or do you decompose the ligature?
2025-09-27 07:17:50
0
Apple User727926140 :
you could also lowercase the entire string first
2025-09-28 00:30:30
0
awstechcloudnerd :
Apple’s asking this meanwhile one of my early interviews asked to code iterative merge sort from scratch.
2025-09-27 03:58:58
0
Riccardo Ferra :
I'm not sure: is there a trick to do it faster in a case like abBbBbBbBbBA?
2025-09-27 10:08:02
0
tracotr :
Yeah man they are not asking this for an interview
2025-09-26 15:32:37
16
Vay :
“Awesome coding question” and it’s literally just iterating through a string once 😭
2025-09-26 16:15:52
9
garbagefreeman :
How is that awesome?
2025-11-15 23:33:13
0
strangegoodvibe :
😁😁😁
2025-10-13 20:22:57
0
To see more videos from user @greghogg5, please go to the Tikwm
homepage.