Documentation ¶
Overview ¶
@Author: Jerry You
@CreatedDate: 2022/11/5
@Last Modified by: lolaliva
@Last Modified time: 2022/11/5 18:26
@Author: Jerry You
@CreatedDate: 2021/9/5
@Last Modified by: lolaliva
@Last Modified time: 2021/9/5 3:48 PM
@Author: Jerry You
@CreatedDate: 2022/9/4
@Last Modified by: lolaliva
@Last Modified time: 2022/9/4 14:27
@Author: Jerry You
@CreatedDate: 2022/9/9
@Last Modified by: lolaliva
@Last Modified time: 2022/9/9 21:15
@Author: Jerry You
@CreatedDate: 2022/9/12
@Last Modified by: lolaliva
@Last Modified time: 2022/9/12 19:19
@Author: Jerry You
@CreatedDate: 2022/9/17
@Last Modified by: lolaliva
@Last Modified time: 2022/9/17 22:31
@Author: Jerry You
@CreatedDate: 2022/9/24
@Last Modified by: lolaliva
@Last Modified time: 2022/9/24 20:49
@Author: Jerry You
@CreatedDate: 2022/9/17
@Last Modified by: lolaliva
@Last Modified time: 2022/9/17 22:39
@Author: Jerry You
@CreatedDate: 2021/9/4
@Last Modified by: lolaliva
@Last Modified time: 2021/9/4 10:03 PM
@Author: Jerry You
@CreatedDate: 2021/9/5
@Last Modified by: lolaliva
@Last Modified time: 2021/9/5 11:43 AM
@Author: Jerry You
@CreatedDate: 2021/9/5
@Last Modified by: lolaliva
@Last Modified time: 2021/9/5 12:01 PM
@Author: Jerry You
@CreatedDate: 2022/9/3
@Last Modified by: lolaliva
@Last Modified time: 2022/9/3 17:00
@Author: Jerry You
@CreatedDate: 2022/8/28
@Last Modified by: lolaliva
@Last Modified time: 2022/8/28 18:22
@Author: Jerry You
@CreatedDate: 2022/9/10
@Last Modified by: lolaliva
@Last Modified time: 2022/9/10 22:33
@Author: Jerry You
@CreatedDate: 2022/9/15
@Last Modified by: lolaliva
@Last Modified time: 2022/9/15 20:56
Package leetcode /*
@Author: Jerry You
@CreatedDate: 2022/9/25
@Last Modified by: lolaliva
@Last Modified time: 2022/9/25 09:14
@Author: Jerry You
@CreatedDate: 2022/8/28
@Last Modified by: lolaliva
@Last Modified time: 2022/8/28 18:44
@Author: Jerry You
@CreatedDate: 2022/10/10
@Last Modified by: lolaliva
@Last Modified time: 2022/10/10 19:02
@Author: Jerry You
@CreatedDate: 2022/9/18
@Last Modified by: lolaliva
@Last Modified time: 2022/9/18 18:36
@Author: Jerry You
@CreatedDate: 2022/9/11
@Last Modified by: lolaliva
@Last Modified time: 2022/9/11 22:11
Package leetcode training from: https://www.codewars.com/kata/52a382ee44408cea2500074c/train/go
Index ¶
- func CheckPermutation(s1 string, s2 string) bool
- func CheckPermutation_2(s1 string, s2 string) bool
- func Determinant(matrix [][]int) int
- func Entry()
- func HasCycle(head *ListNode) bool
- func P(students []int, sandwiches []int) int
- func TODO() int
- func ThreeSum(nums []int) [][]int
- type Item
- type Item901
- type ItemSorter
- type ListNode
- type MaxHeap
- type MyLinkedList
- type Node
- type StockSpanner
- type TreeNode
- type Work
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPermutation ¶
CheckPermutation leetcode submit region begin(Prohibit modification and deletion) 方法一: 哈希表 直接统计s1和s2中每个字符的个数,然后比较每个字符的出现次数是否相等 为了减少内存的使用,可以只用一个map来比较
func CheckPermutation_2 ¶
CheckPermutation_2 方法二: 排序 将s1和s2排序后,然后依次比较每一位是否相同
Types ¶
type ItemSorter ¶
type ItemSorter []Item
func (ItemSorter) Len ¶
func (s ItemSorter) Len() int
func (ItemSorter) Less ¶
func (s ItemSorter) Less(i, j int) bool
func (ItemSorter) Swap ¶
func (s ItemSorter) Swap(i, j int)
type MyLinkedList ¶
type MyLinkedList struct {
// contains filtered or unexported fields
}
leetcode submit region begin(Prohibit modification and deletion)
func Constructor ¶
func Constructor() MyLinkedList
func (*MyLinkedList) AddAtHead ¶
func (this *MyLinkedList) AddAtHead(val int)
func (*MyLinkedList) AddAtIndex ¶
func (this *MyLinkedList) AddAtIndex(index int, val int)
func (*MyLinkedList) AddAtTail ¶
func (this *MyLinkedList) AddAtTail(val int)
func (*MyLinkedList) DeleteAtIndex ¶
func (this *MyLinkedList) DeleteAtIndex(index int)
func (*MyLinkedList) Get ¶
func (this *MyLinkedList) Get(index int) int
type StockSpanner ¶
type StockSpanner struct { // 下一天是第几天 NextIndex int // contains filtered or unexported fields }
func Constructor901 ¶
func Constructor901() StockSpanner
func (*StockSpanner) Next ¶
func (this *StockSpanner) Next(price int) int
Source Files ¶
- 01.02.CheckPermutation.go
- 01.08.setZeroes.go
- 01.09.isFlipedString.go
- 104. Maximum Depth of Binary Tree.go
- 11. container-with-most-water.go
- 1106.go
- 120. minimumTotal.go
- 1221. balancedStringSplit.go
- 1235.go
- 141. Linked List Cycle.go
- 144. Binary Tree Preorder Traversal.go
- 1455. isPrefixOfWord.go
- 1460.canEqual.go
- 1475.finalPrices.go
- 15. 3sum.go
- 1582.numSpecial.go
- 1592.reorderSpaces.go
- 1598.minOperations.go
- 1608.specialArray.go
- 1619.trimMean.go
- 1624. maxLengthBetweenEqualCharacters.go
- 1636.frequencySort.go
- 1640.canFormArray.go
- 1652.decrypt.go
- 1662.go
- 17.09.getKthMagicNumber.go
- 17.19.missingTwo.go
- 1700.go
- 1790.areAlmostEqual.go
- 1894. chalkReplacer.go
- 2. addTwoNumbers.go
- 2000. reversePrefix.go
- 2001. interchangeableRectangles.go
- 2002. maxProduct.go
- 212. findWords.go
- 2415.reverseOddLevels.go
- 26. Remove Duplicates from Sorted Array.go
- 4. Median of Two Sorted Arrays.go
- 447. numberOfBoomerangs.go
- 5. Longest Palindromic Substring.go
- 502. findMaximizedCapital.go
- 53. max-sub-array.go
- 58. lengthOfLastWord.go
- 589. N-ary Tree Preorder Traversal.go
- 600. findIntegers.go
- 6181.longestContinuousSubstring.go
- 6183.sumPrefixScores.go
- 6184.countDaysTogether.go
- 62. uniquePaths.go
- 63. uniquePathsWithObstacles.go
- 64. minPathSum.go
- 646.findLongestChain.go
- 650. minSteps.go
- 652.findDuplicateSubtrees.go
- 655.printTree.go
- 658.findClosestElements.go
- 662.widthOfBinaryTree.go
- 667.constructArray.go
- 669.trimBST.go
- 670.maximumSwap.go
- 672.flipLights.go
- 673. findNumberOfLIS.go
- 678. checkValidString.go
- 68. fullJustify.go
- 687.longestUnivaluePath.go
- 698.canPartitionKSubsets.go
- 707.myLinkedList.go
- 769.(tounder)maxChunksToSorted.go
- 779.kthGrammar.go
- 788.rotatedDigits.go
- 799.(tounder).preimageSizeFZF.go
- 801.minSwap.go
- 817.numComponents.go
- 827.largestIsland.go
- 828.uniqueLetterString.go
- 854.kSimilarity.go
- 856.scoreOfParentheses.go
- 857.(tounder)mincostToHireWorkers.go
- 870.advantageCount.go
- 901.go
- 902.atMostNGivenDigitSet.go
- 904.totalFruit.go
- 931. minFallingPathSum.go
- 940.distinctSubSeqII.go
- 946(todo).validateStackSequences.go
- 998.insertIntoMaxTree.go
- Entry.go
- Matrix Determinant.go
- definition.go
- max.go