Two Sum Problem - Leet Code + Rust

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

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

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

    I enjoyed going through the problem. The only suggestion might be that as you get into more problems it might be better to run the problems in an editor and allow us to go through the normal guidance of the compiler or rust analyser - when small things are missed.
    With that said, I was doing my version in vs code anyway - so I got that part of it.
    I like your approach to sharing knowledge - thanks and good luck with the summer job!

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

      Thank you for your feedback! You know, I was actually planning to work the problem in VSCode (which is also where I solved it initially) but, somewhere in between turning on the camera and starting the video, I changed my mind 😅
      In any case, I'll try to remember this for next time!

    • @TheStuzenz
      @TheStuzenz 4 ปีที่แล้ว

      @@danlogs , good stuff. Part of what I like out watching your tutorials is that you go through a natural flow to make sure people are aware that trial->error->compiler/rust analyzer guidance is part of the flow for understanding how the language pulls everything together. It gives a nice perspective of how to work with the language and tooling.
      I am well impressed with both your knowledge of rust and rust itself as a language. There seems to be lot to learn. I will keep trying to chunk the learning and chip away at it as time allows.
      I am curious to see how mainstream rust as a language might get in the future - and in what spaces. It is really a different experience getting errors from the compiler/rust-analyzer that work more as a tutoring system than the experience in some other languages where you get more of a cryptic error hint/response that more often than not requires a second translation via google.

  • @inspirated
    @inspirated 4 ปีที่แล้ว

    Hey, looking forward to more LC+Rust videos from you. This is fun!

  • @ryanmcconkey6204
    @ryanmcconkey6204 4 ปีที่แล้ว

    I've been beginning rust recently , I love your videos ! Thank you for this content :)

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

    it is awesomeee! How could people be so freaking smart, i barely did brute force solution and was extremely proud of myself😂. But thats good to get humbled and thank you for awesome video and explanation.

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

    5:47 first for loop could be replaced by something like: `let hm = nums.iter().zip(0..).collect::();`, though final solution is better.

  • @arthurlouiskarl
    @arthurlouiskarl 4 ปีที่แล้ว

    in the last example you should really return it other way around like this: "vec![j, i as i32];" note "j" goes first, because it was "first" in order.

    • @danlogs
      @danlogs  4 ปีที่แล้ว

      It works both ways ~ check it out: i.imgur.com/HsBAXks.png ;D

  • @ajinkyax
    @ajinkyax 4 ปีที่แล้ว

    hello :) lets learn

  • @ergpopler413
    @ergpopler413 4 ปีที่แล้ว

    Hi! did you get into microsoft as a rust dev or something else?

    • @danlogs
      @danlogs  4 ปีที่แล้ว

      Something else! I joined internal groups on Rust, tho ~ who knows, got my fingers crossed so maybe I’ll get to work with it in the future ^^