digit

package
v0.0.0-...-a52c104 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atoi

func Atoi(s string) int

Atoi 字符串转int leetcode8 "-2147483648"

func Divide

func Divide(dividend int, divisor int) int

Divide 除法 要求 不能使用 / % 返回整数 leetcode29 整数除法

func FourSum

func FourSum(nums []int, target int) [][]int

FourSum 四数之和 和 前面那个3数之和类似 都要求返回等于目标值的不重复元组 leetcode18 四数之和

func IntToRoman

func IntToRoman(num int) string

IntToRoman 整形转罗马 leetcode12 整形转罗马

func IsPalindrome

func IsPalindrome(x int) bool

IsPalindrome 是否是回文数 leetcode9 Level: easy 不能将这个x 转成字符串处理;

func IsPalindrome2

func IsPalindrome2(x int) bool

IsPalindrome2 不将int 转成string leetcode9 回文数

func ReverseInteger

func ReverseInteger(x int) int

ReverseInteger [-2^31, 2^31-1] leetcode7 反转整数

func RomanToInt

func RomanToInt(s string) int

RomanToInt 罗马转整型 leetcode13 罗马转整型

func ThreeSum

func ThreeSum(nums []int) [][]int

ThreeSum 给你一个包含 n 个整数的数组nums 判断nums中是否存在三个元素使得a + b + c = 0 且不重复的三元组 set 不考虑order leetcode15 三数之和

func ThreeSumClosest

func ThreeSumClosest(nums []int, target int) int

ThreeSumClosest 最接近3数之和 leetcode16: 最接近3数之和 题目至少给3个数 每次输入仅有唯一答案

Types

This section is empty.

Jump to

Keyboard shortcuts

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