Day 1: Find All Duplicates in an Array (

  Рет қаралды 719

Code Streak with Leo

Code Streak with Leo

Күн бұрын

Пікірлер: 8
@OmoruyiOmofonmwan
@OmoruyiOmofonmwan 5 күн бұрын
Gonna subscribe. You can do it my man
@idkname7
@idkname7 11 күн бұрын
I'm gonna follow you , because I wanna do this too , currently studying dsa.
@5foreign346
@5foreign346 11 күн бұрын
this uses O(n) space not constant
@SagarSingh-wj4pn
@SagarSingh-wj4pn 11 күн бұрын
correct! my guy mistook linear for constant space
@codestreakwithleo
@codestreakwithleo 10 күн бұрын
Thanks for pointing it out, I missed the O(1) space complexity condition there. Had a further look at the problem again, and it looks like doing the nums[abs(nums[i]) - 1] < 0 approach should work
@Micha-mx8ii
@Micha-mx8ii 9 күн бұрын
What about this? Does this comply with the requirements? result = [] for k in range(len(nums)): if nums[k] in nums[:k]: result.append(nums[k]) return result
@udaykiran2427
@udaykiran2427 9 күн бұрын
No, will give a TLE as it's O(n^2)
Day 5: Add Two Numbers II (#445)
11:15
Code Streak with Leo
Рет қаралды 590
Find All Duplicates in an Array - Leetcode 442 - Python
9:40
NeetCodeIO
Рет қаралды 28 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
(Extra) Day 1: Lowest Common Ancestor of a Binary Tree (#236)
1:23:34
Code Streak with Leo
Рет қаралды 409
I built a REAL Desktop App with both Tauri and Electron
12:22
Bufferhead
Рет қаралды 93 М.
Day 7: Valid Sudoku (#36)
20:30
Code Streak with Leo
Рет қаралды 260
The Elo Rating System
22:13
j3m
Рет қаралды 104 М.
LeetCode: The Worst Thing to Happen to Software Engineering
8:03
Coding with Dee
Рет қаралды 153 М.
Python vs Rust vs C++ Speed Comparison
1:50
Mial Skywalker
Рет қаралды 185 М.
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 296 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 703 М.