本项目为学习使用,如有侵权,请及时联系删除
抓取了LeetCode所有题目(非AC代码),包含题目描述,初始默认代码等
所有题目已保存在 LeetCodeSpider/src/main/resources/code
目录下
当前仅实现Java语言的抓取,如有其它需求,可自行修改源码实现 (文件名 & 注释生成 & 初始默认代码生成)
修改LeetCodeSpider/src/main/java/win/techflowing/Config.java
文件,配置相关信息后(可抓包获取),运行LeetCodeSpider.java
文件名:题目难度_编号_标题
文件名:E_001_TwoSum
源文件示例:
/**
* [1] Two Sum
*
* difficulty: Easy
*
* TestCase Example: [2,7,11,15] 9
*
* https://leetcode-cn.com/problems/two-sum/
*
*
* Given an array of integers, return indices of the two numbers such that they add up to a specific target.
*
* You may assume that each input would have exactly one solution, and you may not use the same element twice.
*
* Example:
*
*
* Given nums = [2, 7, 11, 15], target = 9,
*
* Because nums[0] + nums[1] = 2 + 7 = 9,
* return [0, 1].
*
*
*
*
*
*
* >>>>>>中文描述<<<<<<
*
*
* [1] 两数之和
*
*
* 给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。
*
* 你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。
*
* 示例:
*
* 给定 nums = [2, 7, 11, 15], target = 9
*
* 因为 nums[0] + nums[1] = 2 + 7 = 9
* 所以返回 [0, 1]
*
*/
public class E_001_TwoSum {
public int[] twoSum(int[] nums, int target) {
}
}