Convert Figma logo to code with AI

MisterBooo logoLeetCodeAnimation

Demonstrate all the questions on LeetCode in the form of animation.(用动画的形式呈现解LeetCode题目的思路)

75,293
13,968
75,293
18

Top Related Projects

17,575

LeetCode Problems' Solutions

✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解

刷算法全靠套路,认准 labuladong 就够了!English version supported! Crack LeetCode, not only how, but also why.

Everything you need to know to get the job.

💯 Curated coding interview preparation materials for busy software engineers

Quick Overview

LeetCodeAnimation is a GitHub repository that provides animated explanations for LeetCode algorithm problems. It aims to help users better understand complex algorithms and data structures through visual representations and step-by-step animations.

Pros

  • Visual learning aids make complex algorithms easier to understand
  • Covers a wide range of LeetCode problems and algorithm types
  • Animations are accompanied by detailed explanations in Chinese
  • Open-source project with potential for community contributions

Cons

  • Explanations are primarily in Chinese, limiting accessibility for non-Chinese speakers
  • Not all LeetCode problems are covered
  • Animations may not be updated as frequently as new LeetCode problems are added
  • Some users may prefer text-based explanations over animations

Code Examples

This project is not a code library, but rather a collection of animated explanations for algorithm problems. Therefore, there are no code examples to provide.

Getting Started

As this is not a code library, there are no specific getting started instructions. However, users can access the animated explanations by visiting the GitHub repository and browsing through the available problem solutions. The animations are typically provided as GIF files or links to external animation platforms.

To use the repository:

  1. Visit the GitHub repository: https://github.com/MisterBooo/LeetCodeAnimation
  2. Browse through the available problem solutions in the repository
  3. Click on the desired problem to view the animated explanation and accompanying text
  4. Use the animations and explanations to enhance your understanding of the algorithm or data structure

Competitor Comparisons

17,575

LeetCode Problems' Solutions

Pros of leetcode

  • Comprehensive collection of LeetCode solutions in multiple programming languages
  • Detailed explanations and comments for each solution
  • Regularly updated with new problems and solutions

Cons of leetcode

  • Lacks visual representations or animations to explain algorithms
  • May be overwhelming for beginners due to the large number of solutions
  • Text-based explanations might be less engaging for some learners

Code Comparison

LeetCodeAnimation (Python):

def twoSum(nums, target):
    hash_table = {}
    for i, num in enumerate(nums):
        if target - num in hash_table:
            return [hash_table[target - num], i]
        hash_table[num] = i
    return []

leetcode (C++):

vector<int> twoSum(vector<int>& nums, int target) {
    unordered_map<int, int> map;
    for (int i = 0; i < nums.size(); i++) {
        if (map.find(target - nums[i]) != map.end())
            return {map[target - nums[i]], i};
        map[nums[i]] = i;
    }
    return {};
}

Both repositories offer valuable resources for LeetCode problem-solving. LeetCodeAnimation focuses on visual explanations and animations, making it more accessible for visual learners. leetcode provides a wider range of solutions in multiple languages with detailed explanations, catering to a broader audience of programmers. The choice between the two depends on individual learning preferences and programming language requirements.

✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解

Pros of LeetCode-Go

  • Comprehensive coverage of LeetCode problems in Go
  • Well-organized structure with detailed explanations and complexity analysis
  • Regular updates and active maintenance

Cons of LeetCode-Go

  • Lacks visual representations or animations for problem-solving steps
  • May be less engaging for visual learners compared to LeetCodeAnimation
  • Focused solely on Go, limiting its audience to Go developers

Code Comparison

LeetCode-Go (Go):

func twoSum(nums []int, target int) []int {
    m := make(map[int]int)
    for i, num := range nums {
        if j, ok := m[target-num]; ok {
            return []int{j, i}
        }
        m[num] = i
    }
    return nil
}

LeetCodeAnimation (Java):

public int[] twoSum(int[] nums, int target) {
    Map<Integer, Integer> map = new HashMap<>();
    for (int i = 0; i < nums.length; i++) {
        int complement = target - nums[i];
        if (map.containsKey(complement)) {
            return new int[] { map.get(complement), i };
        }
        map.put(nums[i], i);
    }
    throw new IllegalArgumentException("No two sum solution");
}

Both repositories offer valuable resources for LeetCode problem-solving, with LeetCode-Go providing in-depth Go implementations and LeetCodeAnimation offering visual explanations. The choice between them depends on the user's preferred learning style and programming language focus.

刷算法全靠套路,认准 labuladong 就够了!English version supported! Crack LeetCode, not only how, but also why.

Pros of fucking-algorithm

  • More comprehensive coverage of algorithms and data structures
  • In-depth explanations with detailed problem-solving strategies
  • Regular updates and active community engagement

Cons of fucking-algorithm

  • Primarily text-based explanations, lacking visual aids
  • May be overwhelming for beginners due to its depth and complexity

Code Comparison

LeetCodeAnimation:

public ListNode reverseList(ListNode head) {
    ListNode prev = null;
    ListNode curr = head;
    while (curr != null) {
        ListNode nextTemp = curr.next;
        curr.next = prev;
        prev = curr;
        curr = nextTemp;
    }
    return prev;
}

fucking-algorithm:

ListNode* reverseList(ListNode* head) {
    if (head == nullptr || head->next == nullptr) {
        return head;
    }
    ListNode* last = reverseList(head->next);
    head->next->next = head;
    head->next = nullptr;
    return last;
}

Summary

LeetCodeAnimation focuses on visual representations of algorithms, making it easier for beginners to grasp concepts. It uses animations to illustrate problem-solving processes, which can be particularly helpful for visual learners.

fucking-algorithm, on the other hand, provides more in-depth explanations and covers a wider range of topics. It offers detailed problem-solving strategies and regular updates, making it suitable for those seeking a deeper understanding of algorithms and data structures.

While LeetCodeAnimation excels in visual presentation, fucking-algorithm offers more comprehensive textual explanations and a broader scope of content. The choice between the two depends on individual learning preferences and the desired depth of understanding.

Everything you need to know to get the job.

Pros of interviews

  • Covers a broader range of topics beyond just LeetCode problems, including system design and behavioral questions
  • Provides more comprehensive explanations and solutions in text format
  • Includes resources and links to additional learning materials

Cons of interviews

  • Lacks visual representations or animations to illustrate concepts
  • May be overwhelming for beginners due to the extensive amount of information
  • Less frequently updated compared to LeetCodeAnimation

Code Comparison

LeetCodeAnimation (Java):

public ListNode reverseList(ListNode head) {
    ListNode prev = null;
    ListNode curr = head;
    while (curr != null) {
        ListNode nextTemp = curr.next;
        curr.next = prev;
        prev = curr;
        curr = nextTemp;
    }
    return prev;
}

interviews (Python):

def reverse_list(head):
    prev = None
    current = head
    while current:
        next_node = current.next
        current.next = prev
        prev = current
        current = next_node
    return prev

Both repositories provide similar implementations for reversing a linked list, with LeetCodeAnimation using Java and interviews using Python. The core logic remains the same, demonstrating the consistency in problem-solving approaches across different programming languages.

💯 Curated coding interview preparation materials for busy software engineers

Pros of tech-interview-handbook

  • Comprehensive coverage of various interview topics beyond just coding problems
  • Includes non-technical aspects of interviews, such as behavioral questions and negotiation tips
  • Regularly updated with community contributions and industry trends

Cons of tech-interview-handbook

  • Lacks visual aids or animations to explain complex concepts
  • May be overwhelming for beginners due to the breadth of information covered
  • Doesn't focus specifically on step-by-step problem-solving techniques

Code Comparison

While both repositories primarily focus on interview preparation, they don't typically include extensive code samples. However, tech-interview-handbook does provide some code snippets for common algorithms and data structures. Here's an example of a binary search implementation from tech-interview-handbook:

def binary_search(arr, target):
    left, right = 0, len(arr) - 1
    while left <= right:
        mid = (left + right) // 2
        if arr[mid] == target:
            return mid
        elif arr[mid] < target:
            left = mid + 1
        else:
            right = mid - 1
    return -1

LeetCodeAnimation, on the other hand, focuses more on visual representations and animations rather than code snippets.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

LeetCode Animation All in One

Travis Travis

There is an English version of README here. just click it!

我会尽力将 LeetCode 上所有的题目都用动画的形式演示出来,计划用 3 到 4 年时间去完成它,期待与你见证这一天!

文章最新首发于微信公众号 吴师兄学算法,您可以关注获取最新的文章。

为了帮助大家更好的入门学习算法,经过半年的积累,我给大家整理了《剑指 Offer》系列的四十道题目,都是算法面试的高频题目,每一道题目我都提供详细的分析、精美的配图、易于理解的动画视频,适合那些第一次刷题的同学,当然,也适合重复刷题的老手再次学习巩固基础。

文章同步博客地址:https://blog.algomooc.com/

汇总

序号题目&题解动画
0十大经典排序算法动画与解析,看我就够了!(配代码完全版)
1两数之和
2两数相加
3无重复字符的最长子串
4寻找两个有序数组的中位数
9回文数
10正则表达式匹配
11盛最多水的容器
15三数之和
19删除链表的倒数第 N 个节点
20有效的括号
21合并两个有序链表
23合并 K 个排序链表
24两两交换链表中的节点
25K 个一组翻转链表
26删除排序数组中的重复项
32最长有效括号
38报数
41缺失的第一个正数
66加一
75颜色分类
86分割链表
92反转链表 II
94二叉树的中序遍历
101对称二叉树
102二叉树的层序遍历
103二叉树的锯齿形层次遍历
107二叉树的层次遍历 II
118杨辉三角
119杨辉三角II
110平衡二叉树
121买卖股票的最佳时机
122买卖股票的最佳时机II
123买卖股票的最佳时机III
125验证回文串
131分割回文串
136只出现一次的数字
138复制带随机指针
139单词拆分
141环形链表
144二叉树的前序遍历
145二叉树的后序遍历
146LRU缓存机制
150逆波兰表达式求值
153寻找旋转排序数组中的最小值
164最大间距
167两数之和 II - 输入有序数组
169求众数
172阶乘后的零
187重复的 DNA 序列
191位1的个数
199二叉树的右视图
201数字范围按位与
203移除链表元素
206反转链表
209长度最小的子数组
219存在重复元素 II
229求众数II
2312的幂
232使用栈实现队列
237删除链表中的节点
239滑动窗口最大值
242有效的字母异位词
268缺失数字
279完全平方数
283移动零
295数据流的中位数
301删除无效的括号
319灯泡开关
3263 的幂
328奇偶链表
3424的幂
344反转字符串
347前K个高频元素
349两个数组的交集
350两个数组的交集 II
445两数相加 II
447回旋镖的数量
454四数相加 II
642设计一个搜索自动完成系统
690员工的重要性
739每日温度
877石子游戏
1025除数博弈
1099小于 K 的两数之和