Skip to content

Commit a6a1a8a

Browse files
committed
refactor(go): standardize function names to lowercase and remove package declaration
1 parent 116944e commit a6a1a8a

8 files changed

+8
-24
lines changed

go/Hash Maps and Sets/geometric_sequence_triplets.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package hashmapsandsets
2-
3-
func GeometricSequenceTriplets(nums []int, r int) int {
1+
func geometricSequenceTriplets(nums []int, r int) int {
42
// Use 'map' to ensure the default value of 0 is returned when
53
// accessing a key that doesn’t exist in the hash map. This effectively sets
64
// the default frequency of all elements to 0.

go/Hash Maps and Sets/longest_chain_of_consecutive_numbers.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package hashmapsandsets
2-
3-
func LongestChainOfConsecutiveNumbers(nums []int) int {
1+
func longestChainOfConsecutiveNumbers(nums []int) int {
42
if len(nums) == 0 {
53
return 0
64
}

go/Hash Maps and Sets/longest_chain_of_consecutive_numbers_brute_force.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package hashmapsandsets
2-
3-
func LongestChainOfConsecutiveNumbersBruteForce(nums []int) int {
1+
func longestChainOfConsecutiveNumbersBruteForce(nums []int) int {
42
if len(nums) == 0 {
53
return 0
64
}

go/Hash Maps and Sets/pair_sum_unsorted.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package hashmapsandsets
2-
3-
func PairSumUnsorted(nums []int, target int) []int {
1+
func pairSumUnsorted(nums []int, target int) []int {
42
hashmap := make(map[int]int)
53
for i, x := range nums {
64
complement := target - x

go/Hash Maps and Sets/pair_sum_unsorted_two_pass.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package hashmapsandsets
2-
3-
func PairSumUnsortedTwoPass(nums []int, target int) []int {
1+
func pairSumUnsortedTwoPass(nums []int, target int) []int {
42
numMap := make(map[int]int)
53
// First pass: Populate the hash map with each number and its index.
64
for i, num := range nums {

go/Hash Maps and Sets/verify_sudoku_board.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package hashmapsandsets
2-
3-
func VerifySudokuBoard(board [][]int) bool {
1+
func verifySudokuBoard(board [][]int) bool {
42
// Create hash sets for each row, column, and subgrid to keep
53
// track of numbers previously seen on any given row, column, or
64
// subgrid.

go/Hash Maps and Sets/zero_striping.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package hashmapsandsets
2-
3-
func ZeroStriping(matrix [][]int) {
1+
func zeroStriping(matrix [][]int) {
42
if len(matrix) == 0 || len(matrix[0]) == 0 {
53
return
64
}

go/Hash Maps and Sets/zero_striping_hash_sets.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
package hashmapsandsets
2-
3-
func ZeroStripingHashSets(matrix [][]int) {
1+
func zeroStripingHashSets(matrix [][]int) {
42
if len(matrix) == 0 || len(matrix[0]) == 0 {
53
return
64
}

0 commit comments

Comments
 (0)