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

Overview

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

Discover solutions to AlgoExpert problems in six programming languages: Python, Java, Go, C++, C#, and JavaScript/TypeScript.

⭐ Table of Contents:

Screenshots

Arrays, Binary Search Trees, Binary Trees, and Dynamic Programming

Famous Algorithms, Graphs, Greedy Algorithms, and Heaps

LinkedList, Recursion, Searching, and Sorting

Stacks, Strings and Tries

List of Problems and Solutions

Difficulty Levels Guide

  • 🟢 -> Easy
  • 🔵 -> Medium
  • 🔴 -> Hard
  • ⚫ -> Very Hard

Problems and Solutions

Problem Statement Difficulty Level Category Solution Link Website Link
⭐ Two Number Sum 🟢 Arrays Program.java Link
⭐ Validate Subsequence 🟢 Arrays Program.java Link
⭐ Tournament Winner 🟢 Arrays Program.java
⭐ Non-Constructible Change 🟢 Arrays Program.java Link
⭐ Sorted Squared Array 🟢 Arrays Program.java Link
⭐ Three Number Sum 🔵 Arrays Program.java Link
⭐ Smallest Difference 🔵 Arrays Program.java Link
⭐ Move Element To End 🔵 Arrays Program.java Link
⭐ Monotonic Array 🔵 Arrays Program.java Link
⭐ Spiral Traverse 🔵 Arrays Program.java Link
⭐ Longest Peak 🔵 Arrays Program.java Link
⭐ Array Of Products 🔵 Arrays Program.java Link
⭐ First Duplicate Value 🔵 Arrays Program.java Link
⭐ Merge Overlapping Intervals 🔵 Arrays Program.java Link
⭐ Four Number Sum 🔴 Arrays Program.java Link
⭐ Subarray Sort 🔴 Arrays Program.java Link
⭐ Largest Range 🔴 Arrays Program.java Link
⭐ Min Rewards 🔴 Arrays Program.java Link
⭐ Zigzag Traverse 🔴 Arrays Program.java
⭐ Apartment Hunting ⚫ Arrays Program.java Link
⭐ Calendar Matching ⚫ Arrays Program.java Link
⭐ Waterfall Streams ⚫ Arrays Program.java Link
⭐ Minimum Area Rectangle ⚫ Arrays Program.java Link
⭐ Line Through Points ⚫ Arrays Program.java Link
⭐ Palindrome Check 🟢 Strings Program.java Link
⭐ Caesar Cypher Encryptor 🟢 Strings Program.java Link
⭐ Run-Length Encoding 🟢 Strings Program.java Link
⭐ Generate Document 🟢 Strings Program.java
⭐ First Non-Repeating Character 🟢 Strings Program.java
⭐ Longest Palindromic Substring 🔵 Strings Program.java
⭐ Group Anagrams 🔵 Strings Program.java
⭐ Valid IP Addresses 🔵 Strings Program.java
⭐ Reverse Words In String 🔵 Strings Program.java
⭐ Minimum Characters For Words 🔵 Strings Program.java
⭐ Longest Substring Without Duplication 🔴 Strings Program.java
⭐ Underscorify Substring 🔴 Strings Program.java
⭐ Pattern Matcher 🔴 Strings Program.java
⭐ Smallest Substring Containing ⚫ Strings Program.java
⭐ Longest Balanced Substring ⚫ Strings Program.java
⭐ Remove Duplicates From Linked List 🟢 Linked Lists Program.java
⭐ Linked List Construction 🔵 Linked Lists Program.java
⭐ Remove Kth Node From End 🔵 Linked Lists Program.java
⭐ Sum of Linked Lists 🔵 Linked Lists Program.java
⭐ Find Loop 🔴 Linked Lists Program.java
⭐ Reverse Linked List 🔴 Linked Lists Program.java
⭐ Merge Linked Lists 🔴 Linked Lists Program.java
⭐ Shift Linked List 🔴 Linked Lists Program.java
⭐ LRU Cache ⚫ Linked Lists Program.java
⭐ Rearrange Linked List ⚫ Linked Lists Program.java
⭐ Linked List Palindrome ⚫ Linked Lists Program.java
⭐ Zip Linked List ⚫ Linked Lists Program.java
⭐ Node Swap ⚫ Linked Lists Program.java
⭐ Min Max Stack Construction 🔵 Stacks Program.java
⭐ Balanced Brackets 🔵 Stacks Program.java
⭐ Sunset Views 🔵 Stacks Program.java
⭐ Sort Stack 🔵 Stacks Program.java
⭐ Shorten Path 🔴 Stacks Program.java
⭐ Largest Rectangle Under Skyline 🔴 Stacks Program.java
⭐ Binary Search 🟢 Searching Program.java
⭐ Find Three Largest Numbers 🟢 Searching Program.java
⭐ Search In Sorted Matrix 🔵 Searching Program.java
⭐ Shifted Binary Search 🔴 Searching Program.java
⭐ Search For Range 🔴 Searching Program.java
⭐ Quickselect 🔴 Searching Program.java
⭐ Index Equals Value 🔴 Searching Program.java
⭐ Bubble Sort 🟢 Sorting Program.java
⭐ Insertion Sort 🟢 Sorting Program.java
⭐ Selection Sort 🟢 Sorting Program.java
⭐ Three Number Sort 🔵 Sorting Program.java
⭐ Quick Sort 🔴 Sorting Program.java
⭐ Heap Sort 🔴 Sorting Program.java
⭐ Radix Sort 🔴 Sorting Program.java
⭐ Merge Sort ⚫ Sorting Program.java
⭐ Minimum Waiting Time 🟢 Greedy Algorithms Program.java
⭐ Class Photos 🟢 Greedy Algorithms Program.java
⭐ Tandem Bicycle 🟢 Greedy Algorithms Program.java
⭐ Task Assignment 🔵 Greedy Algorithms Program.java
⭐ Valid Starting City 🔵 Greedy Algorithms Program.java
⭐ Min Heap Construction 🔵 Heaps Program.java
⭐ Continuous Median 🔴 Heaps Program.java
⭐ Sort K-Sorted Array 🔴 Heaps Program.java
⭐ Laptop Rentals 🔴 Heaps Program.java
⭐ Merge Sorted Arrays ⚫ Heaps Program.java
⭐ Kadane's Algorithm 🔵 Famous Algorithms Program.java
⭐ Dijkstra's Algorithm 🔴 Famous Algorithms Program.java
⭐ Topological Sort 🔴 Famous Algorithms Program.java
⭐ Knuth Morris Pratt Algorithm ⚫ Famous Algorithms Program.java
⭐ A* Algorithm ⚫ Famous Algorithms Program.java
⭐ Nth Fibonacci 🟢 Recursion Program.java
⭐ Product Sum 🟢 Recursion Program.java
⭐ Permutations 🔵 Recursion Program.java
⭐ Powerset 🔵 Recursion Program.java
⭐ Phone Number Mnemonics 🔵 Recursion Program.java
⭐ Staircase Traversal 🔵 Recursion Program.java
⭐ Lowest Common Manager 🔴 Recursion Program.java
⭐ Interweaving Strings 🔴 Recursion Program.java
⭐ Solve Sudoku 🔴 Recursion Program.java
⭐ Ambiguous Measurements 🔴 Recursion Program.java
⭐ Generate Div Tags 🔴 Recursion Program.java
⭐ Number Of Binary Tree Topologies ⚫ Recursion Program.java
⭐ Non Attacking Queens ⚫ Recursion Program.java
⭐ Find Closest Value In BST 🟢 Binary Search Trees Program.java
⭐ BST Traversal 🔵 Binary Search Trees Program.java
⭐ BST Construction 🔵 Binary Search Trees Program.java
⭐ Validate BST 🔵 Binary Search Trees Program.java
⭐ Min Height BST 🔵 Binary Search Trees Program.java
⭐ Find Kth Largest Value In BST 🔵 Binary Search Trees Program.java
⭐ Reconstruct BST 🔵 Binary Search Trees Program.java
⭐ Validate Three Nodes 🔴 Binary Search Trees Program.java
⭐ Same BSTs 🔴 Binary Search Trees Program.java
⭐ Right Smaller Than ⚫ Binary Search Trees Program.java
⭐ Branch Sums 🟢 Binary Trees Program.java
⭐ Node Depths 🟢 Binary Trees Program.java
⭐ Invert Binary Tree 🔵 Binary Trees Program.java
⭐ Binary Tree Diameter 🔵 Binary Trees Program.java
⭐ Find Successor 🔵 Binary Trees Program.java
⭐ Height Balanced Binary Tree 🔵 Binary Trees Program.java
⭐ Max Path Sum In Binary Tree 🔴 Binary Trees Program.java
⭐ Find Nodes Distance K 🔴 Binary Trees Program.java
⭐ Iterative In-Order Traversal ⚫ Binary Trees Program.java
⭐ Flatten Binary Tree ⚫ Binary Trees Program.java
⭐ Right Sibling Tree ⚫ Binary Trees Program.java
⭐ All Kinds of Node Depths ⚫ Binary Trees Program.java
⭐ Compare Leaf Traversal ⚫ Binary Trees Program.java
⭐ Max Subset Sum No Adjacent 🔵 Dynamic Programming Program.java
⭐ Number Of Ways To Make Change 🔵 Dynamic Programming Program.java
⭐ Min Number Of Coins For Change 🔵 Dynamic Programming Program.java
⭐ Levenshtein Distance 🔵 Dynamic Programming Program.java
⭐ Number Of Ways To Traverse Graph 🔵 Dynamic Programming Program.java
⭐ Max Sum Increasing Subsequence 🔴 Dynamic Programming Program.java
⭐ Longest Common Subsequence 🔴 Dynamic Programming Program.java
⭐ Min Number of Jumps 🔴 Dynamic Programming Program.java
⭐ Water Area 🔴 Dynamic Programming Program.java
⭐ Knapsack Problem 🔴 Dynamic Programming Program.java
⭐ Disk Stacking 🔴 Dynamic Programming Program.java
⭐ Numbers In Pi 🔴 Dynamic Programming Program.java
⭐ Maximum Sum Submatrix 🔴 Dynamic Programming Program.java
⭐ Maximize Expression 🔴 Dynamic Programming Program.java
⭐ Max Profit With K Transactions ⚫ Dynamic Programming Program.java
⭐ Palindrome Partitioning Min Cuts ⚫ Dynamic Programming Program.java
⭐ Longest Increasing Subsequence ⚫ Dynamic Programming Program.java
⭐ Longest String Chain ⚫ Dynamic Programming Program.java
⭐ Square Of Zeroes ⚫ Dynamic Programming Program.java
⭐ Depth-First Search 🟢 Graphs Program.java
⭐ Single Cycle Check 🔵 Graphs Program.java
⭐ Breadth-First Search 🔵 Graphs Program.java
⭐ River Sizes 🔵 Graphs Program.java
⭐ Youngest Common Ancestor 🔵 Graphs Program.java
⭐ Remove Islands 🔵 Graphs Program.java
⭐ Cycle In Graph 🔵 Graphs Program.java
⭐ Minimum Passes Of Matrix 🔵 Graphs Program.java
⭐ Boggle Board 🔴 Graphs Program.java
⭐ Rectangle Mania ⚫ Graphs Program.java
⭐ Airport Connections ⚫ Graphs Program.java
⭐ Detect Arbitrage ⚫ Graphs Program.java
⭐ Two-Edge Connected Graph ⚫ Graphs Program.java
⭐ Suffix Trie Construction 🔵 Tries Program.java
⭐ Multi String Search 🔴 Tries Program.java

Contributing

Pull requests and contributions are welcome. For major changes, please open an issue first to discuss what you would like to change.

Ensure to follow the guidelines and update tests as appropriate.

Contact Info

If you have any question or want to reach me directly, Contact Nsikak Imoh.

Go to Top

You might also like...
Python-like dictionaries for Go

Dict Python dictionary data type (dict) in Go Package dict is a Go implementation of Python dict, which are hashable object maps. Dictionaries complem

parody of some of the basic python core features (collections package)

collections import "github.com/marcsantiago/collections" Overview Index Subdirectories Overview Index func StringEncoder(encoder *bytes.Buffer, data D

go.fifo provides a simple fifo thread-safe queue for the Go programming language

go.fifo Description go.fifo provides a simple FIFO thread-safe queue. *fifo.Queue supports pushing an item at the end with Add(), and popping an item

Dynamic object-oriented programming support for the Go language

Goop Description The Goop (Go Object-Oriented Programming) package provides support for dynamic object-oriented programming constructs in Go, much lik

Generates data structure definitions from JSON files for any kind of programming language

Overview Archivist generates data structure definitions from JSON files for any kind of programming language. It also provides a library for golang to

A serverless cluster computing system for the Go programming language

Bigslice Bigslice is a serverless cluster data processing system for Go. Bigslice exposes composable API that lets the user express data processing ta

Tutorial code for my video Beginner Programming with Golang - Conways Game of Life

Beginner Programming with Golang - Conways Game of Life Who is this tutorial for? Programming beginners and people with programming experience who wan

convert curl commands to Python, JavaScript, Go, PHP, R, Dart, Java, MATLAB, Rust, Elixir and more
convert curl commands to Python, JavaScript, Go, PHP, R, Dart, Java, MATLAB, Rust, Elixir and more

curlconverter curlconverter transpiles curl commands into programs in other programming languages. $ curlconverter --data "Hello, world!" example.com

GoRose(go orm), a mini database ORM for golang, which inspired by the famous php framwork laravle's eloquent. It will be friendly for php developer and python or ruby developer. Currently provides six major database drivers: mysql,sqlite3,postgres,oracle,mssql, Clickhouse.
⛳ A minimal programming language inspired by Ink, JavaScript, and Python.

⛳ Golfcart My blog post: Creating the Golfcart Programming Language Getting Started Scope Rules Usage Building and tests Contributions License Golfcar

protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript clients that connect the web frontend and golang backend fronted by grpc-gateway.

protoc-gen-grpc-gateway-ts protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript

Go-interview-problems - Interview problems written in Go

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

Show Languages In Code. A fast and lightweight CLI to generate stats on the languages inside your project
Show Languages In Code. A fast and lightweight CLI to generate stats on the languages inside your project

slic Show Languages In Code. Usage Run it with an -h flag to list all commands. -d flag can be used to specify the directory of search -i flag can be

XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator

xgen Introduction xgen is a library written in pure Go providing a set of functions that allow you to parse XSD (XML schema definition) files. This li

❄️ Elsa is a minimal, fast and secure runtime for JavaScript and TypeScript written in Go

Elsa Elsa is a minimal, fast and secure runtime for JavaScript and TypeScript written in Go, leveraging the power from QuickJS. Features URL based imp

jsPolicy - Easier & Faster Kubernetes Policies using JavaScript or TypeScript
jsPolicy - Easier & Faster Kubernetes Policies using JavaScript or TypeScript

Website • Getting Started Guide • Documentation • Blog • Twitter • Slack jsPolicy - Easier & Faster Kubernetes Policies using JavaScript or TypeScript

The high-performance build system for JavaScript & TypeScript codebases
The high-performance build system for JavaScript & TypeScript codebases

Documentation Visit https://turborepo.org to view the full documentation. Community To chat with other community members, you can join the Turborepo D

Frecuency of ASCII characters in Typescript and Javascript code
Frecuency of ASCII characters in Typescript and Javascript code

Tool to traverse Javascript and Typescript codebases counting the number of occurrences of each ASCII character. Usefull for optimizing tokenizers / lexers

Aes for go and java; build go fo wasm and use wasm parse java response.

aes_go_wasm_java aes for go and java; build go fo wasm and use wasm parse java response. vscode setting config settings.json { "go.toolsEnvVars":

Owner
Nsikak Imoh
I learned the rules like a pro, now I break them like an artist.
Nsikak Imoh
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
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
101+ coding interview problems in Go

116+ Coding Interview Problems with Detailed Solutions The Ultimate Go Study Guide eBook version → Join my mailing list to get the latest updates here

Hoanh An 3.3k Nov 17, 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
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
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 13, 2022
Stalin sort in multiple languages!

stalin-sort Stalin sort in multiple languages, contributions are welcome! Motivation This repo is motivated by this tweet, this tweet contains a refer

CaKrome 0 Jan 14, 2022
estruct traverses javascript projects and maps all the dependencies and relationships to a JSON. the output can be used to build network visualizations of the project and document the architecture.

EStruct traverses javascript projects and maps all the dependencies and relationships to a JSON. The output can be used to build network visualizations of the project and document the architecture.

Ray Luxembourg 11 Jan 27, 2022
A close implementation of JavaScript's Set written in Go

Set The Set struct allows unique values storing of any type. Initializing a Set s := set.New() // Empty Set s := set.New("hi", 45, Person{name: "Gophe

Sergio Ríos 0 Dec 20, 2021