Skip to content

Dubjay18/leet-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leet-go

A small collection of Go solutions for common coding interview and algorithm problems. Each problem lives in its own folder with a single main.go entry point.

Structure

Each folder contains a standalone Go program:

  • 3sum/
  • 3sumClosest/
  • addTwoNums/
  • averageOfLevels/
  • backspaceCompare/
  • binarySearch/
  • binaryTreePaths/
  • characterReplacement/
  • convert1Dinto2Darray/
  • countElemGTPA/
  • deleteDuplicates/
  • diagonal-difference/
  • EncodeDecode/
  • findDisappearedNumbers/
  • findDuplicates/
  • findMaxAverage/
  • groupAnagrams/
  • hasCycle/
  • hasDuplicate/
  • invertTree/
  • isSameTree/
  • isSubsequence/
  • jumpingOnClouds/
  • lengthOfLongestSubstring/
  • longestPalindrome/
  • majorityElement/
  • maxDepth/
  • meetingRooms/
  • mergeTrees/
  • mergeTwoLists/
  • middleNode/
  • minDepth/
  • mini-max-sum/
  • minSubArrayLen/
  • missingNumber/
  • move-zeros/
  • nextGreatestLetter/
  • palindromeLinkedlist/
  • pathSum/
  • permutationInString/
  • plusMinus/
  • productExceptSelf/
  • rangeSumQuery/
  • removeDuplicates/
  • removeElements/
  • repeatedString/
  • reverseLinkedList/
  • sortColors/
  • sortedSquares/
  • staircase/
  • subarraySumEqualsK/
  • subtree/
  • sudoku/
  • topKFrequent/
  • twoSum/
  • water-container/

Prerequisites

  • Go 1.20+ (any recent Go version should work)

Run a solution

From the repo root, run any problem by pointing go run at its folder:

go run ./twoSum

If a solution reads from stdin or prints output, follow the prompts or pipe input as needed.

Update the folder list

Run the helper script to refresh the auto-generated folder list in this README:

bash ./scripts/update-readme.sh

Notes

These are standalone practice solutions. There is no shared package or test harness at the repo root.

About

leetcode solutions in go

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors