leetcode

package
v0.0.0-...-6d8a413 Latest Latest
Warning

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

Go to latest
Published: May 18, 2019 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Difficulty

type Difficulty struct {
	Level int `json:"level"`
}

Difficulty 问题的难度

type Leetcode

type Leetcode struct {
	Username string    // 用户名
	Ranking  int       // 网站排名
	Updated  time.Time // 数据更新时间

	Record   record   // 已解答题目与全部题目的数量,按照难度统计
	Problems problems // 所有问题的集合
}

Leetcode leetcode

func NewLeetCode

func NewLeetCode(username string) *Leetcode

NewLeetCode new leetcode

func (*Leetcode) AvailableTable

func (lc *Leetcode) AvailableTable() string

func (*Leetcode) CompletedTable

func (lc *Leetcode) CompletedTable() string

func (*Leetcode) FavoriteCount

func (lc *Leetcode) FavoriteCount() int

func (*Leetcode) FavoriteTable

func (lc *Leetcode) FavoriteTable() string

func (*Leetcode) ProgressTable

func (lc *Leetcode) ProgressTable() string

func (*Leetcode) UnavailableList

func (lc *Leetcode) UnavailableList() string

type Problem

type Problem struct {
	ID                                 int
	Title                              string
	TitleSlug                          string
	PassRate                           string
	Difficulty                         string
	IsAccepted, IsPaid, IsFavor, IsNew bool
	HasNoGoOption                      bool // 不能够使用 Go 语言解答
}

func (Problem) DidaTask

func (p Problem) DidaTask(prefix string) string

func (Problem) GetDir

func (p Problem) GetDir() string

func (Problem) IsAvailable

func (p Problem) IsAvailable() bool
func (p Problem) Link() string

func (Problem) PackageName

func (p Problem) PackageName() string

func (Problem) SetDir

func (p Problem) SetDir(path string)

type Question

type Question struct {
	Content           string
	Stats             questionStat
	CodeDefinition    []codeDefinition
	SampleTestCase    string
	MetaData          string
	TranslatedContent string
	EnableRunCode     bool
}

type State

type State struct {
	ACs       int    `json:"total_acs"`
	Title     string `json:"question__title"`
	IsNew     bool   `json:"is_new_question"`
	Submitted int    `json:"total_submitted"`
	ID        int    `json:"frontend_question_id"`
	TitleSlug string `json:"question__title_slug"`
}

State 保存单个问题的解答状态

Jump to

Keyboard shortcuts

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