Skip to content

ShidiDaisy/CodingInterview

Repository files navigation

Coding Interview

Array

  1. Three Sum

Sequence

  1. Longest Increasing Subsequence using DP

Math

  1. Maximum Subarray Problem (Kadane's algorithm)

Tree

  1. Inorder Tree Traversal
    • Start from leaf. recusively traverse leftsubtree, itself, right subtree

Inorder Tree Traversal

  1. Preorder Tree Traversal * Start from root * The traversal can be done iteratively where the deferred nodes are sorted in the stack or it can be done through recursion.

Preorder Tree Traversal

  1. Postorder Tree Traversal
    • Start from leaf, recursively traverse its' left subtree then it's right subtree.
    • Root will be the last node to visit.

Postorder Tree Traversal

Set

  1. Union Find Algorithm

Sort

Topological Sort

A topological sort of a directed graph is a linear order of its vertices such that for every directed edge uv from vertex u to v. A topological sort is possible if and only if the graph is DAG.

Reference

Techie Delight (https://www.techiedelight.com/top-algorithms-data-structures-concepts-computer-science/)

About

Practices for coding interview.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published