Skip to content

Commit cb47c27

Browse files
authored
Use single line imports where possible (#136)
1 parent adc15f7 commit cb47c27

33 files changed

+33
-99
lines changed

array/find_duplicate_in_array_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package array
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestFindDuplicate tests solution(s) with the following signature and problem description:

bit/oddly_repeated_number_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package bit
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestOddlyRepeatedNumber tests solution(s) with the following signature and problem description:

dnc/binary_search_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package dnc
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestBinarySearch tests solution(s) with the following signature and problem description:

dp/house_robber_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package dp
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestMaxHouseRobber tests solution(s) with the following signature and problem description:

dp/interleaving_string_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package dp
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestIsInterleavingString tests solution(s) with the following signature and problem description:

dp/minimum_deletion_to_make_palindrome_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package dp
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestMinimumDeletionsToMakePalindrome tests solution(s) with the following signature and problem description:

dp/sum_up_to_integer_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package dp
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestSumUpToInteger tests solution(s) with the following signature and problem description:

dp/word_distance_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package dp
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestWordDistance tests solution(s) with the following signature and problem description:

graph/dijkstra_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package graph
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
type dijkstraTestCase struct {
86
graph []*dijkstraVertex

graph/employee_headcount_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package graph
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestEmployeeHeadCount tests solution(s) with the following signature and problem description:

graph/number_of_islands_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package graph
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestNumberOfIslands tests solution(s) with the following signature and problem description:

greedy/jump_game_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package greedy
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestJumpGame tests solution(s) with the following signature and problem description:

greedy/knapsack_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package greedy
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestKnapsack tests solution(s) with the following signature and problem description:

heap/kth_largest_element_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package heap
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestKthLargestElement tests solution(s) with the following signature and problem description:

linkedlist/join_sorted_lists_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package linkedlist
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestJoinTwoSortedLinkedLists tests solution(s) with the following signature and problem description:

linkedlist/keep_repetitions_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package linkedlist
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestKeepRepetitions tests solution(s) with the following signature and problem description:

linkedlist/reverse_in_place_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package linkedlist
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestReverseLinkedList tests solution(s) with the following signature and problem description:

linkedlist/serialization_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package linkedlist
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestSerializeAndUnserializeLinkedList tests solution(s) with the following signature and problem description:

queue/generate_binary_numbers_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package queue
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestGenerateBinaryNumbers tests solution(s) with the following signature and problem description:

recursion/climbing_stairs_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package recursion
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestClimbingStairs tests solution(s) with the following signature and problem description:

recursion/exponentiation_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package recursion
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestPowerOf tests solution(s) with the following signature and problem description:

recursion/expression_operators_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package recursion
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestExpressionOperators tests solution(s) with the following signature and problem description:

recursion/is_palindrome_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package recursion
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestIsPalindrome tests solution(s) with the following signature and problem description:

recursion/multiplication_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package recursion
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestMultiplication tests solution(s) with the following signature and problem description:

recursion/regular_expressions_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package recursion
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestRegularExpressions tests solution(s) with the following signature and problem description:

recursion/reverse_number_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package recursion
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestReverseDigits tests solution(s) with the following signature and problem description:

stack/basic_calculator_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package stack
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestBasicCalculator tests solution(s) with the following signature and problem description:

stack/longest_valid_parentheses_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package stack
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestLongestValidParentheses tests solution(s) with the following signature and problem description:

strings/longest_dictionary_word_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package strings
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestLongestDictionaryWordContainingKey tests solution(s) with the following signature and problem description:

strings/longest_substring_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package strings
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestLongestSubstrings tests solution(s) with the following signature and problem description:

strings/look_and_tell_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package strings
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestFindDuplicate tests solution(s) with the following signature and problem description:

strings/number_in_english_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package strings
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestReadNumberInEnglish tests solution(s) with the following signature and problem description:

strings/reverse_vowels_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package strings
22

3-
import (
4-
"testing"
5-
)
3+
import "testing"
64

75
/*
86
TestReverseVowels tests solution(s) with the following signature and problem description:

0 commit comments

Comments
 (0)