Skip to content

GeorgeNum7/Leetcode-Top-Interview-150

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 LeetCode Top Interview 150 - Java Solutions

🇨🇳 中文说明   |   🇺🇸 English Version

本项目包含 LeetCode 面试必刷 150 题的 Java 实现代码。

Java LeetCode License

📖 简介 (Introduction)

欢迎来到我的算法仓库!本项目记录了我攻克 LeetCode 面试必刷 150 题 的完整过程。我的目标是编写清晰、高效且结构良好的 Java 代码来解决这些经典的面试题目。


📂 项目结构 (Project Structure)

代码按 算法类型 (Pattern) 分包组织。这样可以根据解题技巧对题目进行分类,便于复习和查找。

src/
├── ArrayAndString/      # 数组与字符串
├── DoublePointer/       # 双指针
├── SlidingWindow/       # 滑动窗口
├── DivideAndConquer/    # 分治算法
├── BinaryTree/          # 二叉树
└── ...

⚡ 代码模式 (Code Pattern)

为了兼顾 本地调试LeetCode 提交 的便捷性,每个题解都遵循 静态内部类 (Static Inner Class) 模式。

示例模板

package DoublePointer;

// 1. 题目名称作为外层类名
public class ProblemName {
    // 2. 本地测试入口
    public static void main(String[] args) {
        System.out.println(new Solution().solve(...));
    }

    // 3. LeetCode 核心逻辑 (提交时复制这一块)
    static class Solution {
        public boolean solve(String s) {
            // 算法具体实现...
            return true;
        }
    }
}

🛠️ 如何运行 (How to Run)

  1. 克隆仓库:
    git clone [https://github.com/GeorgeNum7/Leetcode-Top-Interview-150.git](https://github.com/GeorgeNum7/Leetcode-Top-Interview-150.git)
  2. 打开项目: 使用 IntelliJ IDEA 或 Eclipse 打开项目文件夹。
  3. 运行代码: 找到 src/ 目录下的任意题目文件,运行其中的 main 方法即可。

About

Java implementations of the LeetCode Top Interview 150 problems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages