What's the purpose? Same time complexity and probably same exact number of operations.
2024-10-20 19:57:35
25
4mt :
Is there a benefit to using the two pointer approach or is it just good practice to utilize two pointers
2024-10-20 03:24:00
2
Simón Sandoval :
Genius
2024-10-19 15:19:14
0
SphinxForex :
Did this. There is a faster way, just iterate trough the list once and create a vector from node pointers. Then just get the len/2 node and its value. Yes memory wise worse but very fast.
2024-10-24 21:02:02
4
dr-hypnos :
do we have confirmation that the list is sorted?
2024-10-18 15:18:56
1
moisaraisa :
I don’t get it, what if fast is at the end and slow is right behind it, how is that the middle?
2024-10-20 09:48:52
0
TeRacksito :
if you know the length, which you should, just traverse to the middle. it will have three times less operations
2024-11-04 20:56:09
0
Josuuee :
Useless in practice, good to learn
2025-01-07 18:37:10
0
Joshua Koudys :
linked lists used in the last:
two decades: 2
two days on leetcode: 65535
2024-11-28 12:48:35
14
Jordan Hardy :
when I first learned this I shit my pantaloons
2024-10-20 14:40:32
0
Dmitriy Nazaratiy :
Null pointer exception. Don’t do this carelessly
2024-12-08 16:00:20
0
Ambious :
These types of questions always make me wonder how it would deal with an even vs. uneven lengths of lists.
2024-10-19 08:50:00
109
pluto. :
Be careful using that notation on the first line with objects. You’re assigning both variables to the same instance of an object which can cause issues if you are mutating data.
2024-10-20 00:23:37
4
okiabetter :
out of bounds will just error? not useful
2024-11-05 05:44:21
1
Pew :
table.length/2
2024-11-02 04:13:53
0
To see more videos from user @greghogg5, please go to the Tikwm
homepage.