An open API service indexing awesome lists of open source software.

https://github.com/jbltx/go-training

Leetcode submissions and others samples in Golang
https://github.com/jbltx/go-training

golang leetcode leetcode-submissions sastantua

Last synced: 3 months ago
JSON representation

Leetcode submissions and others samples in Golang

Awesome Lists containing this project

README

          

# Go Training

### Leetcode submissions

All Leetcode submissions have their own folder in the repo. You can find them by their frontendID and questionSlug propeties.

**Submission List**
* 78-Subsets [Submission](/78-subsets/subsets.go) - [Leetcode Link](https://leetcode.com/problems/subsets)
* 190-Reverse Bits [Submission](/190-reverse-bits/reverse-bits.go) - [Leetcode Link](https://leetcode.com/problems/reverse-bits)
* 168-Excel Sheet Column Title [Submission](/168-excel-sheet-column-title/excel-sheet-column-title.go) - [Leetcode Link](https://leetcode.com/problems/excel-sheet-column-title)
* 171-Excel Sheet Column Number [Submission](/171-excel-sheet-column-number/excel-sheet-column-number.go) - [Leetcode Link](https://leetcode.com/problems/excel-sheet-column-number)
* 191-Number of 1 Bits [Submission](/191-number-of-1-bits/number-of-1-bits.go) - [Leetcode Link](https://leetcode.com/problems/number-of-1-bits)
* 476-Number Complement [Submission](/476-number-complement/number-complement.go) - [Leetcode Link](https://leetcode.com/problems/number-complement)
* 463-Island Perimeter [Submission](/463-island-perimeter/island-perimeter.go) - [Leetcode Link](https://leetcode.com/problems/island-perimeter)
* 389-Find the Difference [Submission](/389-find-the-difference/find-the-difference.go) - [Leetcode Link](https://leetcode.com/problems/find-the-difference)
* 412-Fizz Buzz [Submission](/412-fizz-buzz/fizz-buzz.go) - [Leetcode Link](https://leetcode.com/problems/fizz-buzz)
* 23-Merge k Sorted Lists [Submission](/23-merge-k-sorted-lists/merge-k-sorted-lists.go) - [Leetcode Link](https://leetcode.com/problems/merge-k-sorted-lists)
* 19-Remove Nth Node From End of List [Submission](/19-remove-nth-node-from-end-of-list/remove-nth-node-from-end-of-list.go) - [Leetcode Link](https://leetcode.com/problems/remove-nth-node-from-end-of-list)
* 17-Letter Combinations of a Phone Number [Submission](/17-letter-combinations-of-a-phone-number/letter-combinations-of-a-phone-number.go) - [Leetcode Link](https://leetcode.com/problems/letter-combinations-of-a-phone-number)
* 16-3Sum Closest [Submission](/16-3sum-closest/3sum-closest.go) - [Leetcode Link](https://leetcode.com/problems/3sum-closest)
* 15-3Sum [Submission](/15-3sum/3sum.go) - [Leetcode Link](https://leetcode.com/problems/3sum)
* 11-Container With Most Water [Submission](/11-container-with-most-water/container-with-most-water.go) - [Leetcode Link](https://leetcode.com/problems/container-with-most-water)
* 136-Single Number [Submission](/136-single-number/single-number.go) - [Leetcode Link](https://leetcode.com/problems/single-number)
* 46-Permutations [Submission](/46-permutations/permutations.go) - [Leetcode Link](https://leetcode.com/problems/permutations)
* 1047-Remove All Adjacent Duplicates In String [Submission](/1047-remove-all-adjacent-duplicates-in-string/remove-all-adjacent-duplicates-in-string.go) - [Leetcode Link](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string)
* 1051-Height Checker [Submission](/1051-height-checker/height-checker.go) - [Leetcode Link](https://leetcode.com/problems/height-checker)
* 1071-Greatest Common Divisor of Strings [Submission](/1071-greatest-common-divisor-of-strings/greatest-common-divisor-of-strings.go) - [Leetcode Link](https://leetcode.com/problems/greatest-common-divisor-of-strings)
* 1078-Occurrences After Bigram [Submission](/1078-occurrences-after-bigram/occurrences-after-bigram.go) - [Leetcode Link](https://leetcode.com/problems/occurrences-after-bigram)
* 1089-Duplicate Zeros [Submission](/1089-duplicate-zeros/duplicate-zeros.go) - [Leetcode Link](https://leetcode.com/problems/duplicate-zeros)
* 1103-Distribute Candies to People [Submission](/1103-distribute-candies-to-people/distribute-candies-to-people.go) - [Leetcode Link](https://leetcode.com/problems/distribute-candies-to-people)
* 1108-Defanging an IP Address [Submission](/1108-defanging-an-ip-address/defanging-an-ip-address.go) - [Leetcode Link](https://leetcode.com/problems/defanging-an-ip-address)
* 82-Remove Duplicates from Sorted List II [Submission](/82-remove-duplicates-from-sorted-list-ii/remove-duplicates-from-sorted-list-ii.go) - [Leetcode Link](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii)
* 75-Sort Colors [Submission](/75-sort-colors/sort-colors.go) - [Leetcode Link](https://leetcode.com/problems/sort-colors)
* 36-Valid Sudoku [Submission](/36-valid-sudoku/valid-sudoku.go) - [Leetcode Link](https://leetcode.com/problems/valid-sudoku)
* 37-Sudoku Solver [Submission](/37-sudoku-solver/sudoku-solver.go) - [Leetcode Link](https://leetcode.com/problems/sudoku-solver)
* 48-Rotate Image [Submission](/48-rotate-image/rotate-image.go) - [Leetcode Link](https://leetcode.com/problems/rotate-image)
* 8-String to Integer (atoi) [Submission](/8-string-to-integer-atoi/string-to-integer-atoi.go) - [Leetcode Link](https://leetcode.com/problems/string-to-integer-atoi)
* 6-ZigZag Conversion [Submission](/6-zigzag-conversion/zigzag-conversion.go) - [Leetcode Link](https://leetcode.com/problems/zigzag-conversion)
* 104-Maximum Depth of Binary Tree [Submission](/104-maximum-depth-of-binary-tree/maximum-depth-of-binary-tree.go) - [Leetcode Link](https://leetcode.com/problems/maximum-depth-of-binary-tree)
* 100-Same Tree [Submission](/100-same-tree/same-tree.go) - [Leetcode Link](https://leetcode.com/problems/same-tree)
* 88-Merge Sorted Array [Submission](/88-merge-sorted-array/merge-sorted-array.go) - [Leetcode Link](https://leetcode.com/problems/merge-sorted-array)
* 83-Remove Duplicates from Sorted List [Submission](/83-remove-duplicates-from-sorted-list/remove-duplicates-from-sorted-list.go) - [Leetcode Link](https://leetcode.com/problems/remove-duplicates-from-sorted-list)
* 70-Climbing Stairs [Submission](/70-climbing-stairs/climbing-stairs.go) - [Leetcode Link](https://leetcode.com/problems/climbing-stairs)
* 69-Sqrt(x) [Submission](/69-sqrtx/sqrtx.go) - [Leetcode Link](https://leetcode.com/problems/sqrtx)
* 67-Add Binary [Submission](/67-add-binary/add-binary.go) - [Leetcode Link](https://leetcode.com/problems/add-binary)
* 66-Plus One [Submission](/66-plus-one/plus-one.go) - [Leetcode Link](https://leetcode.com/problems/plus-one)
* 58-Length of Last Word [Submission](/58-length-of-last-word/length-of-last-word.go) - [Leetcode Link](https://leetcode.com/problems/length-of-last-word)
* 5-Longest Palindromic Substring [Submission](/5-longest-palindromic-substring/longest-palindromic-substring.go) - [Leetcode Link](https://leetcode.com/problems/longest-palindromic-substring)
* 4-Median of Two Sorted Arrays [Submission](/4-median-of-two-sorted-arrays/median-of-two-sorted-arrays.go) - [Leetcode Link](https://leetcode.com/problems/median-of-two-sorted-arrays)
* 53-Maximum Subarray [Submission](/53-maximum-subarray/maximum-subarray.go) - [Leetcode Link](https://leetcode.com/problems/maximum-subarray)
* 38-Count and Say [Submission](/38-count-and-say/count-and-say.go) - [Leetcode Link](https://leetcode.com/problems/count-and-say)
* 35-Search Insert Position [Submission](/35-search-insert-position/search-insert-position.go) - [Leetcode Link](https://leetcode.com/problems/search-insert-position)
* 28-Implement strStr() [Submission](/28-implement-strstr/implement-strstr.go) - [Leetcode Link](https://leetcode.com/problems/implement-strstr)
* 27-Remove Element [Submission](/27-remove-element/remove-element.go) - [Leetcode Link](https://leetcode.com/problems/remove-element)
* 26-Remove Duplicates from Sorted Array [Submission](/26-remove-duplicates-from-sorted-array/remove-duplicates-from-sorted-array.go) - [Leetcode Link](https://leetcode.com/problems/remove-duplicates-from-sorted-array)
* 21-Merge Two Sorted Lists [Submission](/21-merge-two-sorted-lists/merge-two-sorted-lists.go) - [Leetcode Link](https://leetcode.com/problems/merge-two-sorted-lists)
* 20-Valid Parentheses [Submission](/20-valid-parentheses/valid-parentheses.go) - [Leetcode Link](https://leetcode.com/problems/valid-parentheses)
* 14-Longest Common Prefix [Submission](/14-longest-common-prefix/longest-common-prefix.go) - [Leetcode Link](https://leetcode.com/problems/longest-common-prefix)
* 13-Roman to Integer [Submission](/13-roman-to-integer/roman-to-integer.go) - [Leetcode Link](https://leetcode.com/problems/roman-to-integer)
* 9-Palindrome Number [Submission](/9-palindrome-number/palindrome-number.go) - [Leetcode Link](https://leetcode.com/problems/palindrome-number)
* 7-Reverse Integer [Submission](/7-reverse-integer/reverse-integer.go) - [Leetcode Link](https://leetcode.com/problems/reverse-integer)
* 3-Longest Substring Without Repeating Characters [Submission](/3-longest-substring-without-repeating-characters/longest-substring-without-repeating-characters.go) - [Leetcode Link](https://leetcode.com/problems/longest-substring-without-repeating-characters)
* 2-Add Two Numbers [Submission](/2-add-two-numbers/add-two-numbers.go) - [Leetcode Link](https://leetcode.com/problems/add-two-numbers)
* 1-Two Sum [Submission](/1-two-sum/two-sum.go) - [Leetcode Link](https://leetcode.com/problems/two-sum)
---

### Others Samples

#### Sastantua

The goal of this program is to build the Sastantua pyramid using a given size as argument. Several sizes can be given in the same command line.

```bash
go run ./sastantua 1 3
```

**Output**

```bash
Size 1
/*\
/***\
/**|**\

Size 3
/*\
/***\
/*****\
/***********\
/*************\
/***************\
/*****************\
/***********************\
/*************************\
/************|||************\
/*************|$|*************\
/**************|||**************\
```