Skip to content

Set of pretty standard solutions for questions commonly asked on an interview

License

Notifications You must be signed in to change notification settings

afiodorov/interviews

Repository files navigation

Interviews

Set of pretty standard solutions for questions commonly asked at interviews. All of it is written by me. The solutions include:

  • Simple heap implementation using std::vector as a storage: ./src/includes/heap.cpp
  • Heapsort: ./src/heapSort.cpp
  • Singly linked list class: ./src/includes/linkedlist.cpp
  • Stack class: ./src/includes/stack.cpp
  • Queue implemented using an array: ./src/includes/queue.cpp
  • Queue implemented using stacks: ./src/includes/stack.cpp
  • Tree class: ./src/includes/smartTree.cpp
    • In-order, Post-order, Pre-order traversal using recursion
    • Pre-order iterative traversal and a stack
    • Pre-order iterative traversal using no stack (just parent pointer of each node)
    • In-order successor of a node
  • Binary Search Tree class: ./src/includes/smartSearchTree.cpp
    • insertion of a node
    • deletion of a node
    • contructing a tree by shuffling a vector
    • constructing a minimum height tree out of a vector: ./src/searchTree.cpp
    • building linked lists out of each tree depth level: ./src/searchTree.cpp
  • Towers of Hanoi recursive solution: ./src/towers.cpp
  • Three stacks implemeted using an array: ./src/threeStacksOneArray.cpp
  • Sorting stack elements using another stack: ./src/stacksort.cpp
  • Stack which remembers its minimum: ./src/stackMin.cpp
  • Primitive grep function: ./src/queries.cpp
  • Finding all permutations recursively: ./src/permutations.cpp
  • Finding if a string is a substring of another string using one call: ./src/isSubstringOneCall.cpp
  • Finding if a string is an anogram of another string using a merge sort: ./src/anograms.cpp
  • Represent a number as a linked list. Adding two numers: ./src/addLinkedLists.cpp

You might also be intersting in my implementation of Knuth's Algorithm X using doubly linked lists [here][pentomino]. [pentomino]: https://github.com/afiodorov/Pentomino

About

Set of pretty standard solutions for questions commonly asked on an interview

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published