8000 GitHub - developgo/algorithms_with_Go at 492da1c607410ef0d403e88a375148f066af6dfe
[go: up one dir, main page]

Skip to content

developgo/algorithms_with_Go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO - Data Structures and Algorithms

Inspired by the Geeksforgeeks - Top 10 Algorithms in Interview Questions article, the intent of this repository is to solve these questions using the Go Language. GO is a great language choice for technical interviews and hopefully here you can find the solutions to the common algorithms/problems easy to understand.

WIP, the description of the below unsolved yet problems can be found in the orginal article.

Contributions are welcomed, following below guidelines

  • keep the consistency and document the code
  • keep it simple, easy to read and understand (not over-engineered, best performance is not in scope)
  • Find Minimum Depth of a Binary Tree
  • [] Maximum Path Sum in a Binary Tree
  • [] Check if a given array can represent Preorder Traversal of Binary Search Tree
  • [] Check whether a binary tree is a full binary tree or not
  • [] Bottom View Binary Tree
  • [] Print Nodes in Top View of Binary Tree
  • [] Remove nodes on root to leaf paths of length < K
  • [] Lowest Common Ancest 633C or in a Binary Search Tree
  • [] Check if a binary tree is subtree of another binary tree
  • [] Reverse alternate levels of a perfect binary tree

Number Theory

  • [] Modular Exponentiation
  • [] Modular multiplicative inverse
  • [] Primality Test | Set 2 (Fermat Method)
  • [] Euler’s Totient Function
  • [] Sieve of Eratosthenes
  • [] Convex Hull
  • [] Basic and Extended Euclidean algorithms
  • [] Segmented Sieve
  • [] Chinese remainder theorem
  • [] Lucas Theorem

BIT Manipulation

  • [] Maximum Subarray XOR
  • [] Magic Number
  • [] Sum of bit differences among all pairs
  • [] Swap All Odds And Even Bits
  • [] Find the element that appears once
  • [] Binary representation of a given number
  • [] Count total set bits in all numbers from 1 to n
  • [] Rotate bits of a number
  • [] Count number of bits to be flipped to convert A to B
  • [] Find Next Sparse Number

String / Array

  • [] Reverse an array without affecting special characters
  • [] All Possible Palindromic Partitions
  • [] Count triplets with sum smaller than a given value
  • [] Convert array into Zig-Zag fashion
  • [] Generate all possible sorted arrays from alternate elements of two given sorted arrays
  • [] Pythagorean Triplet in an array
  • [] Length of the largest subarray with contiguous elements
  • [] Find the smallest positive integer value that cannot be represented as sum of any subset of a given array
  • [] Smallest subarray with sum greater than a given value
  • [] Stock Buy Sell to Maximize Profit

About

GO Data Structures and Algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0