101+ coding interview problems in Go

116+ Coding Interview Problems with Detailed Solutions

Build Status Go Report Card hackernews r/golang

The Ultimate Go Study Guide eBook version →

Join my mailing list to get the latest updates here →

Motivation

I am building a database of most frequently appeared coding interview problems that I think are the most valuable and productive to spend time on. For each one, I am including my thoughts of process on how to approach and solve it, adding well-documented solutions with test cases, time and space complexity analysis. My goal is to help you get good algorithms and data structures so that you can prepare better for your next coding interviews.

These resources that I am looking at are:

If you’re interested in getting updates for this, feel free to join my mailing list here →

Table of Contents

Developing

Count the number of questions:

make count

Clean up, lint source files, run tests and be ready for a push:

make ready

Test only:

make test

Test and report:

make cover

Test verbose:

make test-verbose

Lint:

make lint

Clean up:

make clean

For more information:

make help

Stargazers over time

Stargazers over time

Similar Resources

A Simple Interview Problems With Golang

Interview_Problems we cannot pass more than 2 argument in slice append function either you can pass the slice unfurled or number of arguments comma se

Dec 30, 2021

💯 Materials to help you rock your next coding interview

Tech Interview Handbook Credits: Illustration by @leftaligned Read on the website Black Lives Matter. Support the Equal Justice Initiative What is thi

Jan 4, 2023

Cracking the Coding Interview, 6th Ed

Cracking the Coding Interview, 6th Ed. In order to stay sharp, I try to solve a few of these every week. The repository is organized by chapter. Each

Jan 26, 2022

Collection of Technical Interview Questions solved with Go

go-interview Collection of Technical Interview Questions solved with Go Algorithms A Star Datastructures Linked Lists Doubly Linked List Singly Linked

Jan 9, 2023

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

Learn how to design large-scale systems. Prep for the system design interview.  Includes Anki flashcards.

English ∙ 日本語 ∙ 简体中文 ∙ 繁體中文 | العَرَبِيَّة‎ ∙ বাংলা ∙ Português do Brasil ∙ Deutsch ∙ ελληνικά ∙ עברית ∙ Italiano ∙ 한국어 ∙ فارسی ∙ Polski ∙ русский язы

Jan 9, 2023

Most comprehensive list :clipboard: of tech interview questions :blue_book: of companies scraped from Geeksforgeeks, CareerCup and Glassdoor.

Most comprehensive list :clipboard: of tech interview questions :blue_book: of companies scraped from Geeksforgeeks, CareerCup and Glassdoor.

Companies* Companies E Expedia G Grab M MobiKwik N NEC Technologies P PayPal S Samsung Research Institute U Uber Y Yatra.com Z Zomato Announcements 👐

Dec 29, 2022

Collection of awesome interview references.

Collection of awesome interview references.

Awesome Interview Collection of awesome interview reference

Dec 31, 2022

JumpCloud backend interview assignment

jc-assignment JumpCloud backend interview assignment Hello and thanks for speaking with me earlier this week. As may be apparent from the code, I'm ne

Nov 5, 2021

A programming job interview question problem

Unscramble a scrambled URL Problem statement The problem statement follows. I copied it literally because there's no good way to summarize and retain

Nov 9, 2021

Yandex interview for golang

Тестовые задания на интервью Яндекса при приёме на работу A. Камни и украшения Ограничение времени 1 секунда Ограничение памяти 64Mb Ввод стандартный

May 26, 2022

A Google interview task my friend told me about.

deriving π given a normal distribution Try it yourself: package main import ( "fmt" "github.com/cpmech/gosl/rnd" ) // normal returns a number acc

Dec 16, 2021

Form3tech interview

Form3 Take Home Exercise Engineers at Form3 build highly available distributed systems in a microservices environment. Our take home test is designed

Jan 13, 2022

Practice-dsa-go - Data Structures and Algorithms for Interview Preparation in Go

Data Structures and Algorithms for Interview Preparation in Go Data Structures K

Jul 3, 2022

This is a test / interview implementation, written in go

This is a test / interview implementation, written in go

Factorizer This is a test / interview implementation, written in go. Author's kinda first go project. Just move on. Számok Faktorializálása A faktoriz

Feb 9, 2022

A tool to check problems about meta files of Unity

A tool to check problems about meta files of Unity

A tool to check problems about meta files of Unity on Git repositories, and also the tool can do limited autofix for meta files of auto-generated files.

Dec 22, 2022

:white_check_mark: Test generated HTML for problems

✅ htmltest If you generate HTML files, html-proofer might be the tool for you. If you can't be bothered with a Ruby environment or fancy something a b

Dec 24, 2022

A collection of 100+ popular LeetCode problems solved in Go.

go-leetcode A collection of 100+ popular LeetCode problems that I've solved in Go. Each directory includes a: Description with link to LeetCode proble

Dec 25, 2022

SigNoz helps developer monitor applications and troubleshoot problems in their deployed applications

SigNoz helps developer monitor applications and troubleshoot problems in their deployed applications

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥

Dec 27, 2022

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥.   👉  Open source Application Performance Monitoring (APM) & Observability tool

Monitor your applications and troubleshoot problems in your deployed applications, an open-source alternative to DataDog, New Relic, etc. Documentatio

Sep 24, 2021
Comments
  • Add explicit boundary checks

    Add explicit boundary checks

    The earlier conversion of common.Abs(int(out)) seems to be working for one boundary test case as it is giving a higher value for common.Abs(int(out)) due to floating point imprecision.

    Ex. given input 7085774586302733229 the return value should be 9223372036854775807 instead of 0. However due to floating point imprecision, the last iteration will have out as 922337203685477580 and common.Abs(int(out)) will give 922337203685477632 which is incorrect.

    This PR handles the boundary cases with extra tests and absolute boundary checks.

  • Time/Space Complexity

    Time/Space Complexity

    shouldn't it be be O(n!) instead of O(n) for Time/Space Complexity in https://github.com/hoanhan101/algo/blob/67a1c614cc0dca7d0b1fd1818c576fa8ac20f039/interviewcake/recursive_string_permutation_test.go#L25 ?

  • Useless code

    Useless code

    https://github.com/hoanhan101/algo/blob/64a58f1b486f9de749b5741f669111c19d6e81eb/interviewcake/reverse_string_test.go#L52

    Isn’t this part useless? Code below will not run in those cases anyway, as start < end is false

  • This code will not work properly with this input: [9, 0, 3, 5, 7]

    This code will not work properly with this input: [9, 0, 3, 5, 7]

    This code will not work properly with this input: [9, 0, 3, 5, 7] Subsets_test.go https://github.com/hoanhan101/algo/blob/46d524ff83ff5fc2f4c6d2a63daa1f7b11a883ae/gtci/subsets_test.go#L47

Related tags
Practice-dsa-go - Data Structures and Algorithms for Interview Preparation in Go

Data Structures and Algorithms for Interview Preparation in Go Data Structures K

Jul 3, 2022
Common data structures for solving problems in Golang

datastructs Common data structs for solving problems in Golang. List of data structures can be found in datastructs/pkg Rules for data structures Don'

Nov 7, 2021
Leetcode problems slutions

Leetcode problems slutions https://leetcode.com/problemset/all/ Solved problems 1. Two Sum https://leetcode.com/problems/two-sum/ Go Runtime: 4 ms, Me

Jan 10, 2022
Leetcode-in-go - A collection of solutions of leetcode problems solved in go!

Leetcode in Go A collection of solutions of leetcode problems solved in go! The problems are categorized based on their difficulty level. Easy Problem

Jan 8, 2022
Grokking-algorithms-go - Solutions to common Data Structures problems

This is a repository dedicated to study, learn and solve Data Structure algorith

Apr 4, 2022
Access LeetCode problems via id, Golang implementation

LCid-Go Introduction This naive toy is based on bunnyxt/lcid, and implemented in Golang for practice. They are same in program logic and static files.

Jan 15, 2022
Solutions to AlgoExpert Problems in Six Programming Languages: Python, Java, Go, C++, C#, JavaScript/TypeScript
Solutions to AlgoExpert Problems in Six Programming Languages: Python, Java, Go, C++, C#, JavaScript/TypeScript

Solutions to AlgoExpert Problems in Six Programming Languages: Python, Java, Go, C++, C#, JavaScript/TypeScript Discover solutions to AlgoExpert probl

Dec 11, 2022
Go-leetcode - Just solutions to Leetcode problems in Go

go-leetcode Just solutions to Leetcode problems in Go. Problems are organized in

Feb 4, 2022
Go Solution for LeetCode algorithms problems, 100% coverage.

LeetCode 的 Go 解答 进度 统计规则:1.免费题,2.算法题,3.能提交 Go 解答 Easy Medium Hard Total Accepted 265 456 187 908 Total 267 472 197 936 题解 题号 题目 通过率 难度 收藏 1250 * Check

Jan 5, 2023
Go-interview-problems - Interview problems written in Go

go-interview-problems I created this repository in 2021 to learn Go and practice

Jan 25, 2022