Convert Figma logo to code with AI

geekxh logohello-algorithm

🌍 针对小白的算法训练 | 包括四部分:①.大厂面经 ②.力扣图解 ③.千本开源电子书 ④.百张技术思维导图(项目花了上百小时,希望可以点 star 支持,🌹感谢~)推荐免费ChatGPT使用网站

35,150
6,467
35,150
10

Top Related Projects

《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持 Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 代码。简体版和繁体版同步更新,English version ongoing

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

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

183,979

All Algorithms implemented in Python

54,397

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

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

Quick Overview

The geekxh/hello-algorithm repository is a comprehensive resource for learning data structures and algorithms, primarily aimed at Chinese-speaking developers. It provides a collection of algorithm implementations, explanations, and learning materials, including e-books and interview preparation resources.

Pros

  • Extensive coverage of various data structures and algorithms
  • Includes visual explanations and illustrations for better understanding
  • Offers free e-books and interview preparation materials
  • Provides implementations in multiple programming languages

Cons

  • Primarily in Chinese, which may limit accessibility for non-Chinese speakers
  • Some sections may lack depth or detailed explanations
  • Not frequently updated, with the last commit being over a year ago
  • May not cover the most recent algorithmic developments or interview trends

Code Examples

As this is not a code library but rather a collection of algorithm implementations and learning resources, we'll skip the code examples section.

Getting Started

As this is not a code library, we'll skip the getting started instructions. However, users can access the repository's content by visiting the GitHub page and exploring the various folders and resources provided.

Competitor Comparisons

《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持 Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 代码。简体版和繁体版同步更新,English version ongoing

Pros of hello-algo

  • More comprehensive coverage of algorithms and data structures
  • Cleaner and more organized repository structure
  • Supports multiple programming languages (C++, Java, Python, etc.)

Cons of hello-algo

  • Less focus on interview-specific problems
  • Fewer visual aids and diagrams for explaining concepts

Code Comparison

hello-algorithm (Python):

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

hello-algo (Python):

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

Both repositories provide implementations of common algorithms and data structures. hello-algorithm focuses more on interview preparation and includes a wider range of topics, while hello-algo offers a more structured approach to learning algorithms with support for multiple programming languages. The code comparison shows similar implementations of binary search, with hello-algo using a slightly different method to calculate the midpoint to avoid potential integer overflow.

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

Pros of fucking-algorithm

  • More comprehensive coverage of algorithm topics and problem-solving strategies
  • In-depth explanations and detailed analysis of each algorithm
  • Regular updates and active community engagement

Cons of fucking-algorithm

  • Primarily focused on text-based explanations, with fewer visual aids
  • May be overwhelming for absolute beginners due to its depth and complexity

Code Comparison

fucking-algorithm:

public ListNode reverseKGroup(ListNode head, int k) {
    if (head == null) return null;
    ListNode a, b;
    a = b = head;
    for (int i = 0; i < k; i++) {
        if (b == null) return head;
        b = b.next;
    }
    ListNode newHead = reverse(a, b);
    a.next = reverseKGroup(b, k);
    return newHead;
}

hello-algorithm:

def reverse(head, tail):
    prev = tail.next
    p = head
    while prev != tail:
        nex = p.next
        p.next = prev
        prev = p
        p = nex
    return tail, head

Both repositories offer valuable resources for learning algorithms, but fucking-algorithm provides more in-depth explanations and a wider range of topics. hello-algorithm, on the other hand, may be more suitable for beginners due to its simpler approach and visual aids. The code examples demonstrate different implementation styles and languages, with fucking-algorithm using Java and hello-algorithm using Python.

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

Pros of javascript-algorithms

  • Focuses specifically on JavaScript implementations, making it more accessible for web developers
  • Includes a wider variety of algorithms and data structures, offering a more comprehensive resource
  • Provides detailed explanations and complexity analysis for each algorithm

Cons of javascript-algorithms

  • Less beginner-friendly, with more complex implementations and explanations
  • Lacks visual aids or diagrams to help explain concepts
  • Does not cover as many programming languages as hello-algorithm

Code Comparison

hello-algorithm (Python):

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

javascript-algorithms (JavaScript):

function binarySearch(sortedArray, seekElement) {
  let startIndex = 0;
  let endIndex = sortedArray.length - 1;

  while (startIndex <= endIndex) {
    const middleIndex = startIndex + Math.floor((endIndex - startIndex) / 2);

    if (sortedArray[middleIndex] === seekElement) {
      return middleIndex;
    }

    if (sortedArray[middleIndex] < seekElement) {
      startIndex = middleIndex + 1;
    } else {
      endIndex = middleIndex - 1;
    }
  }

  return -1;
}

Both repositories provide implementations of common algorithms, but javascript-algorithms offers a more in-depth focus on JavaScript, while hello-algorithm covers multiple languages with a more beginner-friendly approach.

183,979

All Algorithms implemented in Python

Pros of Python

  • More comprehensive collection of algorithms across various categories
  • Better organized structure with clear categorization of algorithms
  • Active community with frequent updates and contributions

Cons of Python

  • Lacks detailed explanations or tutorials for each algorithm
  • May be overwhelming for beginners due to its extensive collection

Code Comparison

hello-algorithm (JavaScript):

function bubbleSort(arr) {
    for (let i = 0; i < arr.length - 1; i++) {
        for (let j = 0; j < arr.length - 1 - i; j++) {
            if (arr[j] > arr[j + 1]) {
                [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
            }
        }
    }
    return arr;
}

Python (Python):

def bubble_sort(array):
    n = len(array)
    for i in range(n):
        for j in range(n - i - 1):
            if array[j] > array[j + 1]:
                array[j], array[j + 1] = array[j + 1], array[j]
    return array

Both implementations showcase a similar approach to the bubble sort algorithm, with minor syntax differences due to the programming languages used. The Python version uses more Pythonic conventions, such as range() for loops and tuple unpacking for swapping elements.

54,397

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

Pros of leetcode

  • More comprehensive coverage of LeetCode problems, with solutions in multiple programming languages
  • Regular updates and active community contributions
  • Detailed explanations and time/space complexity analysis for each solution

Cons of leetcode

  • Less focus on fundamental algorithms and data structures compared to hello-algorithm
  • May be overwhelming for beginners due to the large number of problems and solutions
  • Lacks a structured learning path or curriculum

Code Comparison

hello-algorithm (Python):

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

leetcode (JavaScript):

var search = function(nums, target) {
    let left = 0, right = nums.length - 1;
    while (left <= right) {
        const mid = Math.floor((left + right) / 2);
        if (nums[mid] === target) return mid;
        if (nums[mid] < target) left = mid + 1;
        else right = mid - 1;
    }
    return -1;
};

Both repositories provide implementations of common algorithms, but leetcode offers a wider variety of problems and languages, while hello-algorithm focuses more on core concepts and explanations.

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

Pros of LeetCodeAnimation

  • Offers animated visualizations of algorithms, making complex concepts easier to understand
  • Covers a wide range of LeetCode problems with detailed explanations
  • Regularly updated with new content and improvements

Cons of LeetCodeAnimation

  • Primarily focuses on LeetCode problems, which may limit its scope compared to hello-algorithm
  • Animations may not be as helpful for users who prefer text-based explanations
  • Some users might find the visual approach less suitable for quick reference

Code Comparison

hello-algorithm:

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:

public int binarySearch(int[] nums, int target) {
    int left = 0, right = nums.length - 1;
    while (left <= right) {
        int mid = left + (right - left) / 2;
        if (nums[mid] == target) return mid;
        if (nums[mid] < target) left = mid + 1;
        else right = mid - 1;
    }
    return -1;
}

Both repositories provide implementations of common algorithms, but LeetCodeAnimation focuses on visual representations, while hello-algorithm offers more text-based explanations and a broader range of topics beyond LeetCode problems.

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

简介

English version repo and Gitbook is on english branch

小浩算法是一套针对小白的完整的算法训练流程!

css Statr Statr

目前共包括以下几个步骤:

  • PART_1_算法基础
  • PART_2_力扣图解
  • PART_3_大厂面试
  • PART_4_CS知识汇总

目前已支持 PDF 下载

css Statr Statr

这也许是东半球最好的算法学习类项目!


我自己刷题都是在 lintcode 进行,也会在上面更新题解!下方可以直接进入~

正文

PART_1_算法基础

主要包括两部分:

  • a:数据结构知识框架:为了大家更好的掌握数据结构和算法,我把基础知识整理成了一张思维导图,包括下面这些知识点:

开始学习

  • b:对常用的数据结构知识进行总结:

PART_2_力扣图解

显示更多

小浩图解算法题典.PDF【完整版】下载

PART_3_大厂面试(更新中)

显示更多

考虑到现在网上面经实在太杂,很多都冠以 “BAT” 之名,重复率、错误率都非常高。所以我尽可能的挑选出了我认为比较好的 50 篇面经(基本不重复),并对内容做了分类。

建议大家把这个页面收藏起来,防止后面需要的时候找不到了。(整理了近40个小时,跪求star~)

PART_4_CS_知识汇总(TODO)

License

本项目除部分引用开源技术文档的内容外,大部分为本人原创。欢迎任何以学习为目的的传播,但未授权任何平台进行转载!