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.
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/
- Go 1.20+ (any recent Go version should work)
From the repo root, run any problem by pointing go run at its folder:
go run ./twoSumIf a solution reads from stdin or prints output, follow the prompts or pipe input as needed.
Run the helper script to refresh the auto-generated folder list in this README:
bash ./scripts/update-readme.shThese are standalone practice solutions. There is no shared package or test harness at the repo root.