Rust Programming Exercises: Hamming Distance

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

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

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

    So far very similar to F#.

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

    why don't u try exercism once?

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

      @@nyxtom Thanks, I also plan to learn and master rust by same...

    • @abhijit-sarkar
      @abhijit-sarkar 2 ปีที่แล้ว

      I didn't know about Exercism, thanks for the tip. They seem to be a little rough at the edges, but overall I really like the platform. As for Hamming distance, it can be done in a single line: s1.chars().zip(s2.chars()).filter(|(x, y)| x != y).count() (trivial error checking for unequal length strings omitted).