If Programming Was An Anime
Why Stack Overflow recommends it
Stack Overflow users link it as a fun, accurate walkthrough of the find-the-duplicate-in-an-array problem and its O(1)-space tortoise and hare solution.
Recommended by 1 people across 1 different months, 2020 to 2021.
What it is
A short comedy sketch from Joma Tech that dramatizes solving a LeetCode duplicate-finding problem as an anime fight, walking through sorting, hash maps, and the tortoise and hare (Floyd's cycle) algorithm. It is a parody aimed at programmers who know interview-style problems.
What people said
Recommends smac89 · 2021-10 · Stack Overflow · on “first duplicate value for a list in range -n to n in O(1) space”
Solution here: [this video] The solution reduces the problem to a 2 pointer problem, and doesn't modify the array
Cites Danielle · 2020-02 · Stack Overflow · on “Find duplicate element in array in time O(n)”
This video If Programming Was An Anime [this video] is too fun not to share. It is the same problem and the video has the answers: Sorting Creating a hashmap/dictionary. Creating an array. (Though this is partially skipped over.) Using the Tortoise and Hare Algorithm. Note: This problem is more of a trivia problem than it is real world. Any solution beyond a hashmap is premature optimization, except in rare limited ram situations, like embedded programming. Furthermore, when is the last time you've seen in the real world an array where all of the variables within the array fit within the size of the array? Eg, if the data in the array is bytes (0-255) when do you have an array 256 elements or lar
Cites Midhunraj R Pillai · 2021-01 · Stack Overflow · on “Is there any alternatives to 'codewars.com' or 'hackerrank.com' which also checks the time and space complexity of the written program?”
I am looking for a coding training platform like mentioned in the question, also with the feature which checks the program for time and space complexity. I am asking something like mentioned in this [this video] video. Thank you.