leetcode

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 14 Imported by: 0

README

力扣代码生成工具

一条龙服务:

  1. 等待比赛开始(也可以指定之前的一场周赛)
  2. 比赛开始时自动获取力扣周赛题目链接和网页数据(可以指定是否在网页上打开所有题目页面)
  3. 解析出题目样例输入输出和代码
  4. 根据题目代码,生成本地 *.go 文件(支持指定目录)
  5. 根据题目样例输入输出,生成本地 *_test.go 文件(支持指定目录)

具体见 generator_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenLeetCodeSeasonTests

func GenLeetCodeSeasonTests(username, password, slug string, isSolo, openWebPage bool, contestDir, customComment string) error

获取力扣杯题目信息 slug 如 "2020-fall", "2021-spring"

func GenLeetCodeSpecialTests

func GenLeetCodeSpecialTests(username, password string, urlsZHs []string, openWebPage bool, contestDir, customComment string) error

func GenLeetCodeTests

func GenLeetCodeTests(username, password, contestTag string, openWebPage bool, contestDir, customComment string) error

获取题目信息(含题目链接) contestTag 如 "weekly-contest-200",可以从比赛链接中获取

func GetBiweeklyContestID

func GetBiweeklyContestID(contestID int) int

func GetBiweeklyContestTag

func GetBiweeklyContestTag(contestID int) string

func GetWeeklyContestID

func GetWeeklyContestID(contestID int) int

func GetWeeklyContestTag

func GetWeeklyContestTag(contestID int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL