i tried LeetCode in assembly

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น •

  • @dandnnn
    @dandnnn 2 ปีที่แล้ว +1418

    we humbly request the o(n) solution

    • @Lord2225
      @Lord2225 2 ปีที่แล้ว +107

      SIMD if you please.

    • @jomy10-games
      @jomy10-games 2 ปีที่แล้ว +47

      We request with urge the o(n) solution

    • @Erich-Lab
      @Erich-Lab 2 ปีที่แล้ว +110

      Fuck that, you need the o(1) solution.

    • @conorstewart2214
      @conorstewart2214 2 ปีที่แล้ว +44

      @@Erich-Lab wouldn’t that just be a large enough FPGA or ASIC that takes the whole array as an input and simultaneously computes the sum of every pair of numbers and returns a solution. Since everything is done in parallel assuming you have enough FPGA resources and the array is already loaded it should just take as much time as a single addition takes no matter the size of the array.

    • @BlackLightning0Games
      @BlackLightning0Games 2 ปีที่แล้ว +21

      @@conorstewart2214 everything still takes o(n) because unless you have infinitely amount of threads to do parallelism, say you have 1 billion n, no way you can have 1 billion threads.
      Say you do not have infinite threads (100) then it would be N/100 which as N goes to infinity, it is still N.

  • @TigerAnimationsYT
    @TigerAnimationsYT 2 ปีที่แล้ว +493

    such a interesting video... never would I in a million years expect someone to do twosum in assembly. great job!

    • @snapphanen
      @snapphanen 2 ปีที่แล้ว +13

      a million years is a long time

    • @danisob3633
      @danisob3633 2 ปีที่แล้ว +2

      @@snapphanen indeed. id expect them to have expected it already

    • @zvisger
      @zvisger ปีที่แล้ว +2

      @@danisob3633 well I'm smart and I expected for a million years that you would have expected them to have expected that already.

  • @lykewize2048
    @lykewize2048 2 ปีที่แล้ว +236

    I still have nightmares of assembly almost 20 yrs ago on masm32 staying with C. Respects you make it look so easy.

    • @Silent.
      @Silent. 2 ปีที่แล้ว +12

      I'm currently learning masm32 in university lol. Not the worst. Microsoft's x64 is pretty bad though with it's shadow space. Uhh awful

    • @조바이든-r6r
      @조바이든-r6r 2 ปีที่แล้ว +2

      @@Silent. me to learning assembly right now

    • @hairold5680
      @hairold5680 11 หลายเดือนก่อน

      I'm learning Risc v rn, funny times

  • @danmuji7585
    @danmuji7585 2 ปีที่แล้ว +55

    interviewer: can you solve this problem?
    no one: sure, my language of choice is assembly

  • @ChrisM541
    @ChrisM541 2 ปีที่แล้ว +116

    Very, very impressive, and excellent to see some real(!!) assembly skills on youtube. You would have liked the 80's and 90's 'golden era' for assembly coders, certainly from a game making perspective. Things have certainly moved far with CPU instruction sets, but reassuring to see so much familiarity with those opcodes and concepts. Subbed.

    • @retrokoh
      @retrokoh 11 หลายเดือนก่อน

      M68K assembly is my favorite, as I love modding classic Sonic.
      Might try two-sum on that processor😊

  • @Jackarius86
    @Jackarius86 2 ปีที่แล้ว +142

    this is awesome, really makes me want to learn assembly. You make it look so trivial, for me it would be a nightmare!!

    • @LowLevelTV
      @LowLevelTV  2 ปีที่แล้ว +45

      Been doing it for a while lol. Best time to start is now!

    • @Jackarius86
      @Jackarius86 2 ปีที่แล้ว +10

      @@LowLevelTV I can tell! How did you learn? I have always struggled to find any good material for assembly.

    • @LowLevelTV
      @LowLevelTV  2 ปีที่แล้ว +32

      Try out capture the flags. PicoCTF is a good one

  • @CallousCoder
    @CallousCoder 2 ปีที่แล้ว +42

    I love assembly! And I loved your cheeky online assembly work around.
    Did you get assembly in college? I am amazed that most 30 something and below colleagues never ever did anything in assembly. I think I was the last generation where we did a hell of a lot of assembly. Mainly Z80 and 8086 and 68000. I studied EE (digital electronics) and back in 1990 you didn’t have Arduino and cool ESP32s that you could program in C. So when we designed an SBC, we also needed to make it do a certain task and that was basically done in assembly. Was the quickest and easiest way to iterate.

    • @LowLevelTV
      @LowLevelTV  2 ปีที่แล้ว +21

      I did a bit of AVR assembly in my EE pipeline in college and I played a lot of capture the flags as well :) I feel like assembly did the most for teaching me how and why code works/breaks.

    • @CallousCoder
      @CallousCoder 2 ปีที่แล้ว +6

      @@LowLevelTV I totally agree! To me assembly made me understand how computers work, and through that made my EE study simple.
      I didn’t know you also did EE?! Us EE majors for the win 😁 I actually did EE because back in 1990 there wasn’t a deducted CS program yet. It was bunched in with EE.

    • @modipy5703
      @modipy5703 2 ปีที่แล้ว +5

      I’m currently a Comp Sci major in college and we are writing some programs in MIPS assembly. So at least a few colleges are still teaching assembly.

    • @CallousCoder
      @CallousCoder 2 ปีที่แล้ว +2

      @@modipy5703 cool! And MIPS is a nice CPU, lots of registers and great branching. Definitely a good foundation for C and higher languages. Which college do you attend?

    • @modipy5703
      @modipy5703 2 ปีที่แล้ว +4

      @@CallousCoder I attend university of Wisconsin - Oshkosh. We’ve learned Java, then C, then MIPS so far. Learning MIPS has opened my eyes to the basics of computers and how doing certain things in higher level languages can speed up or slow down programs. Assembly is hard but satisfying once you get it to work, and even more satisfying to optimize.

  • @liberatemi9642
    @liberatemi9642 ปีที่แล้ว +7

    Love this - pleased to see younger developers with such enthusiasm for lower level development skills

  • @criostasis
    @criostasis 2 ปีที่แล้ว +10

    Amazing video! Doing ASM this semester and loving it. We are doing dbl precision fp and bit wise ops right now. Just got done creating custom functions and c function calls. Love this class it’s fun.

  • @Bittboy
    @Bittboy ปีที่แล้ว +7

    When accessing pointers multiple times, it helps to store the pointer in a temporary register (if you need it from the stack) and then doing your "lea" operations as needed. The "lea rbx, [rbx..]" method works fine if you only need to access it once. But in this case, it would've been better to not clobber rbx and instead store the first result into another temporary register, removing the need to get setup rbx by accessing the stack again for the second result. As well, there were still plenty of registers available (r10-r15) so using the stack wasn't necessary in this case.

  • @hampuztt
    @hampuztt 2 ปีที่แล้ว +12

    You should post the code as "easy to understand and fast solution"

  • @ac3_train3r_blak34
    @ac3_train3r_blak34 2 ปีที่แล้ว +103

    never seen someone use "ii" for the inner loop haha, very cool though! I'll pretend I followed most of it 🙃

    • @dsdy1205
      @dsdy1205 2 ปีที่แล้ว +25

      That's some chaotic evil type shit there

    • @alexwhitewood6480
      @alexwhitewood6480 2 ปีที่แล้ว +24

      Don't we just use j?

    • @madaraainna
      @madaraainna ปีที่แล้ว +2

      He is amateur.

  • @treelibrarian7618
    @treelibrarian7618 2 ปีที่แล้ว +8

    the __attribute trick was really interesting - I wonder if it would work to integrate a C function into some asm code with non-standard calling conventions... and reminds me of another question:
    is there a way to dynamically parse C structures into nasm files in a mixed project so that the structures can change as needed by the expanding C codebase without having to rewrite asm code that also uses them?
    also, had a quick go at the O(n) solution in C, looks like it would be easy enough in asm too...
    also also, why put input values on the stack? you had enough registers to not need the stack at all except for storing registers that can't be clobbered, and then you wouldn't have needed to keep pulling those values back from memory...
    also also also, thinking now about the extension to this problem where there is a list of targets to find pairs for in the same dataset, maybe has to be sorted lists for reasonable optimisation...

  • @KevinNaughtonJr
    @KevinNaughtonJr 2 ปีที่แล้ว +2

    when i think too much about how computers work it hurts my head, great work!

  • @icarvs_vivit
    @icarvs_vivit 2 ปีที่แล้ว +31

    The main thing to learn here is that C inline assembly syntax and boilerplate is terrible.
    One of the only good reasons to learn pascal is that freepascal does inline assembly (mostly) right.
    Big ups for torturing yourself into getting used to this hell.
    That being said, here are my ASM nitpicks:
    Mov'ing into ebx just to compare eax and ebx when you scratch ebx after compare instead of doing 'cmp eax, dword ptr [rsp+0x20]'
    Using 'inc' instead of adding 1 tends to be slightly slower on some CPUs, specifically some intel CPUs.
    Using dword mov operations while you allocate the full 64 bytes anyway - you are saving a bit of instruction cache when you should be saving instruction cache AND memory cache. If rsp isn't aligned to cache boundaries (and it often won't be) you might lose some cache just to accessing your arguments instead of reserving it for an already cache heavy array search operation.
    While XORing a register to itself does often cancel during instruction parsing, in my experience it sometimes won't (for whatever reason) so it's usually best practice to xor dwords even on higher registers (I think it has something to do with μ-instruction hardware often wanting to combine successive instructions but I'm not certain exactly where the slowdown comes from).
    I don't just have critique, I really like how you did 'lea rax, [rax+4]' even though 'add rax, 4' is less complex and fewer letters because it makes it completely clear without a comment that rax is supposed to be a memory pointer, not a normal value. You also did 'cmp' to memory addresses in multiple places so my above nitpick is clearly of a freak occurrence.

    • @guinea_horn
      @guinea_horn 2 ปีที่แล้ว

      Can I ask why you know all this? What do you do for work?

    • @icarvs_vivit
      @icarvs_vivit 2 ปีที่แล้ว

      ​@@guinea_horn I'm just an enthusiast assembly programmer. You just get these sorts of esoteric opinions from doing enough pure assembly, userland programming and being actively interested in optimizing things like memory footprint and performance.

    • @TheOzumat
      @TheOzumat ปีที่แล้ว

      Isn't inc only slower on old CPUs?

  • @anon_y_mousse
    @anon_y_mousse 2 ปีที่แล้ว +15

    This is pretty cool, though if you wanted to make it easier to follow I'd do it outline instead and get syntax highlighting. I prefer nasm syntax over gas Intel, but at least you didn't do it with AT&T syntax. That would've been the worst.

  • @g-nonymousgems3047
    @g-nonymousgems3047 2 ปีที่แล้ว +63

    This video was more informative than my professor who taught for a semester

    • @LowLevelTV
      @LowLevelTV  2 ปีที่แล้ว +16

      :D glad you learned something

    • @breadone_
      @breadone_ 2 ปีที่แล้ว +4

      i mean not really, he doesnt explain things,, at all i feel

    • @Dsksea
      @Dsksea 2 ปีที่แล้ว +7

      A quote I liked, “Education isn’t something you get. It’s something you take.”
      You’ll learn a lot more spending time reading, solving as many exercise problems as you can and writing as many programs as you can than you will sitting down in a lecture and expecting that you'll magically learn everything.

    • @breadone_
      @breadone_ 2 ปีที่แล้ว +1

      @@Dsksea exactly, just watching this video probably wont do much more than maybe act as a reference

    • @mage3690
      @mage3690 2 ปีที่แล้ว +2

      @@Dsksea one thing I've always said about college is that I never learned anything from college, but the things I learned in college are invaluable and I'd do it all over again just for those things.

  • @PinakiGupta82Appu
    @PinakiGupta82Appu 2 ปีที่แล้ว +5

    Assembly is alien to me. However, I appreciate what you did here.

  • @MahmoudAgha
    @MahmoudAgha ปีที่แล้ว +1

    Employer: so what is your name?
    LLL: I solve leet code problems in asm
    Employer: Hired

  • @szilagyimiklos4757
    @szilagyimiklos4757 ปีที่แล้ว +10

    Now I remember how I used to look at code with 0 programming experience

  • @wknd3822
    @wknd3822 2 ปีที่แล้ว +5

    love your videos its always a fun learning experience keep it on

    • @LowLevelTV
      @LowLevelTV  2 ปีที่แล้ว

      Glad you enjoy it!

  • @ДімаКрасько-с7м
    @ДімаКрасько-с7м ปีที่แล้ว +1

    Can you do some harder problem in assembly? You did easy one and my mind already blown

  • @minhan4444
    @minhan4444 2 ปีที่แล้ว +9

    That’s really impressive ❤

  • @ankk98
    @ankk98 11 หลายเดือนก่อน

    I regret that I never paid attention to these in the classes. Now I don't understand this at all, and I will have to study it all over again.

  • @Majkieboy
    @Majkieboy 2 ปีที่แล้ว +6

    Well done, very informative!

  • @Hype_Incarnate
    @Hype_Incarnate 2 ปีที่แล้ว +1

    As a noob that does web dev. assembly is full of mind bending stuff you have to know.

  • @johnsherfey3675
    @johnsherfey3675 2 ปีที่แล้ว +4

    I've been trying to do leet code in assembly, I use it mainly for the challenges that need you to make some math operators. But also used it for quick text windowing in such, or if I need to brute force something.

  • @gorkemyigit3448
    @gorkemyigit3448 2 ปีที่แล้ว +1

    wow, watching this just a week after the infamous bomb lab. Good job mate

  • @moonshadowrev
    @moonshadowrev 2 ปีที่แล้ว

    i just can say you are doing a wonderful job , you are on another level

  • @abdox86
    @abdox86 2 ปีที่แล้ว

    From the title I knew ur doing something I did sometime ago, just to prove I did 64-bit signed floating point multiplication.

  • @yuriorkis_scream
    @yuriorkis_scream 2 ปีที่แล้ว

    Great job! The power of assembly at his best!

  • @YazhShah
    @YazhShah 2 ปีที่แล้ว

    My brain wants to explode by I continued watching.

  • @MECHANISMUS
    @MECHANISMUS 2 ปีที่แล้ว +2

    This was impressive. I don't understand where pointer arithmetics is done. Shouldn't it be a distinct opcode?

    • @williamdrum9899
      @williamdrum9899 2 ปีที่แล้ว +1

      There are a few ways to do pointer arithmetic on x86, LEA is a very common way but you also see it in a few other places such as:
      sub rsp, 0x40
      mov qword ptr [rsp+0x10], rdi
      Pointer arithmetic is treated the same as integer arithmetic by the cpu, since the only real difference is that your additions/subtractions are based on the size of the data type being pointed to. Assembly doesn't know what's being pointed to however, which is why he had to specify "qword ptr" when dereferencing

  • @SmiteBostil
    @SmiteBostil 2 ปีที่แล้ว

    Insane Mode would be manually inputting eletrical charges(0 n 1) at your processor to use the asm codes

  • @thomasdeniffel2122
    @thomasdeniffel2122 2 ปีที่แล้ว +1

    I love the video. It would have benefited even more, if you didn't prepare the algorithm, but implemented it live with all the iterations and bug fixing. I already understand every command but have the most trouble "interacting" with assembly while developing.

  • @DrLogical987
    @DrLogical987 11 หลายเดือนก่อน

    I used to love programming in assembly on the 68000... Then I came across weird choices of instructions by gcc based on knowing execution times And Then out of order execution on the RISC and realised the compilers would win.
    I still would have tested for Outer loop value at i being > target to skip entire inner loop iterations.

  • @fyionyoutube
    @fyionyoutube 2 ปีที่แล้ว +8

    Hello LLL team, can you guys make a full tutorial for writing assembly code for ARM and arm64 CPU? I want to know more in depth knowledge how loader loads the program in memory and how all the sections are prepared before running main().

  • @Rob-Herrera
    @Rob-Herrera ปีที่แล้ว

    what a cool idea! great job!!

  • @whtiequillBj
    @whtiequillBj 2 ปีที่แล้ว

    I can't decide if I should or shouldn't call out that this isn't pure asm as they variables at the top are C variables as in assembly "int" is an interrupt.

  • @williamdrum9899
    @williamdrum9899 2 ปีที่แล้ว +1

    I tried this last year for advent of code. Unfortunately I was using the Amstrad CPC which is only an 8-bit cpu. Most of the questions required way more than 64k of ram to solve

    • @CallousCoder
      @CallousCoder 2 ปีที่แล้ว

      This is solvable on a 64K, actually most leetcode questions that are easy to mid can be done on a Z80 with a whopping 64K. The only problem is loading test data. Which you either need to compile in your binary as a table. Or create pseudo random values.

    • @williamdrum9899
      @williamdrum9899 2 ปีที่แล้ว

      Something like this isn't too bad. When you're asked to use unixdict or something similar things get messy. It's possible with bank switching but it's not easy.

  • @tommyhuffman7499
    @tommyhuffman7499 2 ปีที่แล้ว +1

    Not all heroes wear capes

  • @hansisbrucker813
    @hansisbrucker813 ปีที่แล้ว

    This was easier to follow than I imagined 😁👍

  • @krisztiankovacs5221
    @krisztiankovacs5221 2 ปีที่แล้ว

    Thank you so much! :) Any tips/recommendations on low level language courses or tutorials?

  • @rezakaaccount
    @rezakaaccount 11 หลายเดือนก่อน

    May I ask what hardware and software combination do you use for your screen annotation? Looked very fluid to me.

  • @loctite417
    @loctite417 11 หลายเดือนก่อน

    "Leetcode for some reason doesnt have assembly as chooseable language"
    I wonder why lmao

  • @NithinJune
    @NithinJune ปีที่แล้ว

    he definitely has a glow up

  • @1_and_only_Crjase
    @1_and_only_Crjase 2 ปีที่แล้ว

    danger to humanity, you are.
    - Master Oogway

  • @JG_1998
    @JG_1998 2 ปีที่แล้ว +2

    #LowLevelMafia #AssemblyGrindset 😤

  • @m1geo
    @m1geo ปีที่แล้ว

    Very nicely done! 👌

    • @LowLevelTV
      @LowLevelTV  ปีที่แล้ว +1

      Thank you very much!

  • @saeye
    @saeye 2 ปีที่แล้ว

    Want to learn this solution just for giggles during an interview.

  • @jalll1
    @jalll1 11 หลายเดือนก่อน

    Why use a compiler when you are the compiler

  • @robertcorbin2749
    @robertcorbin2749 11 หลายเดือนก่อน

    Impressive. 👏 Loved watching you do this. Are you a mainframe system engineer?

  • @jongxina3595
    @jongxina3595 2 ปีที่แล้ว +1

    You didnt need a hashmap, an array with 2^32 entries would ve been enough and definitely easier to do on asm.

    • @nikkiofthevalley
      @nikkiofthevalley ปีที่แล้ว +1

      That's ~2 GB of memory, would you even be able to run that on LeetCode?

  • @ukpauchechi5699
    @ukpauchechi5699 2 ปีที่แล้ว

    i already love this and i haven't even watched it😄

  • @elmax5748
    @elmax5748 2 ปีที่แล้ว

    Please do a coding interview and pull out assembly

  • @adityajha8701
    @adityajha8701 2 ปีที่แล้ว

    i thought i will try my best to understand but it went completely somewhat my head

  • @gunarcom
    @gunarcom 2 ปีที่แล้ว

    I'm going to be honest, I could barely follow that. I still subscribed.

  • @pagefault_in_nonpaged_area
    @pagefault_in_nonpaged_area 2 ปีที่แล้ว

    I guess only microsoft x64 is rcx, rdx, r8, r9 then stack allocated params with floating points in the xmm registers

    • @LowLevelTV
      @LowLevelTV  2 ปีที่แล้ว

      Yeah for some reason Microsoft made their own 64 bit calling convention

    • @williamdrum9899
      @williamdrum9899 2 ปีที่แล้ว

      I've never heard of r8 and r9 but then again I've only used 16-bit x86 which didn't have them

  • @roberthickman4092
    @roberthickman4092 ปีที่แล้ว

    Wander if a 'dumb' SIMD solution could beat everyone? What about unrolling the loops?

  • @mdev790
    @mdev790 ปีที่แล้ว

    Inline assembly is hell

  • @illegalsmirf
    @illegalsmirf 2 ปีที่แล้ว +1

    Well done! I couldn't even do them in Python.

  • @aquajay
    @aquajay 2 ปีที่แล้ว +1

    Leetccode machune code, when?

  • @AD-wg8ik
    @AD-wg8ik 3 หลายเดือนก่อน

    I just learned html and css, is assembly as easy as those to learn. Please help I am trying to get a job soon

  • @joshuarose20
    @joshuarose20 ปีที่แล้ว

    "So now we allocate RAX to stack, pretty simple".
    Me: 👁👄👁️

  • @N00byEdge
    @N00byEdge 2 ปีที่แล้ว

    "We''re gonna set up the stack frame by pushing rbx"
    Yeah sure bro 😂
    Anyways, would have been cool if you had solved this using rep scasd or even simd, oh well.

  • @viktoreidrien7110
    @viktoreidrien7110 2 ปีที่แล้ว +2

    any recommendations to learn assembly like this?

    • @williamdrum9899
      @williamdrum9899 2 ปีที่แล้ว +5

      He's using GCC inline assembly, which in my opinion has horrendous syntax. It's much easier to use a dedicated assembler and use extern keywords to make the function visible to C

    • @viktoreidrien7110
      @viktoreidrien7110 2 ปีที่แล้ว +2

      @@williamdrum9899 thank you

    • @williamdrum9899
      @williamdrum9899 2 ปีที่แล้ว +2

      I would watch Chibiakumas on youtube, his videos are quite good

    • @viktoreidrien7110
      @viktoreidrien7110 2 ปีที่แล้ว +1

      @@williamdrum9899 thanks man, i will check it right away

  • @salonigandhi4283
    @salonigandhi4283 2 ปีที่แล้ว

    if this guy shows up as my interviewee == UNO Reverse

  • @davidgomez79
    @davidgomez79 2 ปีที่แล้ว

    Great video!

  • @michaelmueller9635
    @michaelmueller9635 2 ปีที่แล้ว +4

    my mind is blown ...but wtf did the others guys do with even lower runtime...

  • @Cagri2001
    @Cagri2001 2 ปีที่แล้ว

    why are we storing the parameters on the stack i.e putting them into memory? i would just work with rdi,rsi,rdx,rcx the way they come (i never saw anywhere that u had to store them on the stack)

    • @williamdrum9899
      @williamdrum9899 2 ปีที่แล้ว

      This is the convention a C compiler uses to write assembly code. It does this so that you can call any function within another function without everything falling apart. Otherwise managing all these functions becomes a huge mess

    • @Cagri2001
      @Cagri2001 2 ปีที่แล้ว

      @@williamdrum9899 can you specify by what you mean by everything falling apart?

    • @jackytaly
      @jackytaly 2 ปีที่แล้ว +1

      @@Cagri2001 They’re “caller” saved registers, so whenever you call a function you have to store them bc they can be used/overwritten. Ig C compiler does this automatically to avoid keeping track of if there’s a function call

    • @Cagri2001
      @Cagri2001 2 ปีที่แล้ว

      @@jackytaly thank you
      If I have callee saved registers, then it would have been inside the procedure where we push/pop those registers?

    • @jackytaly
      @jackytaly 2 ปีที่แล้ว

      @@Cagri2001 yup, callee saved registers always have to be saved. Caller saved can be cheaper to use if you don’t have any function calls bc then they don’t have to be saved.

  • @williamdrum9899
    @williamdrum9899 2 ปีที่แล้ว

    Something that has annoyed me for a very long time is the brackets when using LEA. I find it very misleading since no dereferencing is actually taking place. The Motorola 68000 does the same thing with its LEA instruction

    • @williamdrum9899
      @williamdrum9899 2 ปีที่แล้ว

      This isn't a dig at the way you write by the way. I know that you're required to use brackets. It just seems odd that the language was designed that way. As it stands we have to say that [] is the dereference operator EXCEPT when using lea and that's just confusing for new users

    • @LowLevelTV
      @LowLevelTV  2 ปีที่แล้ว

      Yeah the fact that the lea addressing syntax is backwards is a little annoying.

    • @uuuuu1781
      @uuuuu1781 2 ปีที่แล้ว

      It doesnt dereference anything, but could be understood as loading the effective address of the contents at the address in the brackets i guess?

    • @williamdrum9899
      @williamdrum9899 2 ปีที่แล้ว

      @uu uuu, That's true, but I still forget sometimes. Especially when you have pointers to pointers... Don't get me wrong, I'll gladly take it over C's endless sea of * and &, but it's still a bit odd

  • @tablettablete186
    @tablettablete186 2 ปีที่แล้ว

    Any book or any material really for recommendation?

  • @LogicEu
    @LogicEu 2 ปีที่แล้ว

    Thank you for this

  • @DipanGhosh
    @DipanGhosh 2 ปีที่แล้ว

    Damn... I am know several programming languages, and this felt like foreign lingo to me.

  • @ForTheOmnissiah
    @ForTheOmnissiah 2 ปีที่แล้ว

    Using n^2 solution and it's in the top 10%. Damn.

  • @kushalkumarkasina9862
    @kushalkumarkasina9862 2 ปีที่แล้ว +1

    AWESOME!!!

  • @g.4279
    @g.4279 2 ปีที่แล้ว

    Lets see Leetcode problem 420 in assembly!

  • @sp3ct3r71
    @sp3ct3r71 2 ปีที่แล้ว

    he is a literal chad🔥🔥

  • @zachmanifold
    @zachmanifold 2 ปีที่แล้ว

    att syntax gang

  • @callous21
    @callous21 2 ปีที่แล้ว

    What kind of job does this knowledge get you and does it pay well?

  • @philtoa334
    @philtoa334 2 ปีที่แล้ว

    So cool !

  • @ari_archer
    @ari_archer 2 ปีที่แล้ว

    This asm can be optimised more

  • @parosdelos6914
    @parosdelos6914 7 หลายเดือนก่อน

    does leetcode allow you to use att syntax?

  • @firesnake6311
    @firesnake6311 2 ปีที่แล้ว

    I'm stuck, I've been looking for a good resource to learn c and assembly , can u help me plz?

  • @vladislavlebedev6059
    @vladislavlebedev6059 2 ปีที่แล้ว

    I'm not sure there are solutions with hashmap in C on LeetCode

  • @belalelsabbagh7152
    @belalelsabbagh7152 11 หลายเดือนก่อน

    madlad

  • @abhaykatiyar3539
    @abhaykatiyar3539 11 หลายเดือนก่อน

    my head hurts

  • @avananana
    @avananana 2 ปีที่แล้ว

    Now, because your code only runs in O(n^2), please submit the O(1) solution before we can accept your code as a valid solution.

  • @draco5991rep
    @draco5991rep 11 หลายเดือนก่อน

    My brain is horrible, it immediately returned a bad pun after hearing twoSum 😅 the last twosum I processed was with my girlfriend.

  • @haibaom7994
    @haibaom7994 2 ปีที่แล้ว

    Now, that's low level

  • @redship7532
    @redship7532 11 หลายเดือนก่อน

    sum(array)

  • @jamestiotio
    @jamestiotio 2 ปีที่แล้ว

    Eyy fellow Intel syntax enjoyer! :D

  • @mahdirahman8451
    @mahdirahman8451 2 ปีที่แล้ว

    whats ur operating system? i wanna know where the bottom right section is from

  • @Wander4P
    @Wander4P 2 ปีที่แล้ว

    Isn't calling malloc kinda cheating?

  • @RayBellis
    @RayBellis 2 ปีที่แล้ว

    Your test case failures should have been immediately obvious before you ever got that far. A nested loop like that will almost _always_ go from `i = 0 .. n - 1` in the outer loop, and `j = i + 1 .. n` in the inner loop (and yes, I started writing this comment before the point in the video when you ran the tests)

  • @mobslicer1529
    @mobslicer1529 2 ปีที่แล้ว +1

    fuck yeah

  • @kalkidanyishak3455
    @kalkidanyishak3455 2 ปีที่แล้ว

    Assembly?😵

  • @nfsib9264
    @nfsib9264 9 หลายเดือนก่อน

    Do it it O(nlogn) wIth recession please 🙏🙏🙏🙏

  • @Mempler
    @Mempler 11 หลายเดือนก่อน

    couldve been better if written in rust

  • @DTorange1
    @DTorange1 2 ปีที่แล้ว +1

    imagine u r writing this code in interview. Easy offer xD