101+ coding interview problems in Go

Related tags

Data Structures algo
Overview

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

You might also like...
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

💯 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

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

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

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 ∙ русский язы

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 👐

Collection of awesome interview references.
Collection of awesome interview references.

Awesome Interview Collection of awesome interview reference

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

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

Yandex interview for golang

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

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

Form3tech interview

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

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

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

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

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.

: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

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

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. 🔥 🖥

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

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.

    opened by sabandi 1
  • 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 ?

    opened by sabandi 1
  • 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

    opened by alistra 1
  • 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

    opened by PolarisCode 1
Practice-dsa-go - Data Structures and Algorithms for Interview Preparation in Go

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

Sparsh Srivastava 2 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'

Akira Masuda 1 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

Kálmán Hosszu 0 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

null 0 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

Gabriel Magalhães 0 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.

Yunchuan Zheng 0 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 Discover solutions to AlgoExpert probl

Nsikak Imoh 17 Nov 21, 2022
Go-leetcode - Just solutions to Leetcode problems in Go

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

Patrick T Coakley 0 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

aQua 3.1k Nov 28, 2022
Go-interview-problems - Interview problems written in Go

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

Joe Stowers 2 Jan 25, 2022