Skip to content

go mod support. #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/zwfang/leetcode

go 1.12
2 changes: 1 addition & 1 deletion src/0004_median_of_two_sorted_arrays/motsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You may assume nums1 and nums2 cannot be both empty.

package motsa

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

// binary search
// time complexity: O(log(m+n)), where m is nums1's length, n is nums2's length.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note: You may not slant the container and n is at least 2.

package containerwithmostwater

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

// time complexity: O(n)
// space complexity: O(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Note:

package minimumwindowsubstring

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

/*
使用滑动窗口解决这一问题,使用map或者slice统计T字符串中的字母的个数,之后,开始遍历S字符串,对于S中遍历到
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Note: A leaf is a node with no children.

package minimumdepthofbinarytree

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

// TreeNode binary tree node.
type TreeNode struct {
Expand Down
2 changes: 1 addition & 1 deletion src/0120_triangle/triangle.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Given a triangle, find the minimum path sum from top to bottom. Each step you ma

package triangle

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

// dfs
/*
Expand Down
2 changes: 1 addition & 1 deletion src/0198_house_robber/house_robber.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Explanation: Rob house 1 (money = 2), rob house 3 (money = 9) and rob house 5 (m

package houserobber

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

/*
func rob(nums []int) int {
Expand Down
2 changes: 1 addition & 1 deletion src/0300_longest_increasing_subsequence/lis.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Follow up:

package lis

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

// Dynamic Programming
// TIme complexity: O(n^2)
Expand Down
2 changes: 1 addition & 1 deletion src/0343_integer_break/integer_break.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Note: You may assume that n is not less than 2 and not larger than 58.

package integerbreak

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

// recursion
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Note:

package intersectionof2arrays

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

func intersection(nums1 []int, nums2 []int) []int {
set1 := utils.NewSet()
Expand Down
2 changes: 1 addition & 1 deletion src/0376_wiggle_subsequence/wiggle_subsequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Can you do it in O(n) time?

package wigglesubsequence

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

/*
* 用up[i]和down[i]分别记录到第i个元素为止以上升沿和下降沿结束的最长“摆动”
Expand Down
2 changes: 1 addition & 1 deletion src/0435_non_overlapping_intervals/dp_solution.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Note:
package nonoverlappingintervals

import (
"leetcode/utils"
"github.com/zwfang/leetcode/utils"
"sort"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Note:

package largestnumberatleasttwiceofothers

import "leetcode/utils"
import "github.com/zwfang/leetcode/utils"

// Time complexity: O(n)
// Space complexity: O(1)
Expand Down