- The goal is to learn data strctures and algorithms using C#. This is my learning experience using a strictly typed object oriented language. Through out the process I will analyze the theoretical running times of operations on the data structures.
- Correctness: The data structure should correctly implement its interface. Use testing for validation and also try to include separtion of concerts for better algorithm pattern.
- Time complexity: The running times of operations on the data structure should be as small as possible.
- Space complexity: The data structure should use as little memory as possible.
A function called insertShiftArray which takes in an array and the value to be added. Without utilizing any of the built-in methods available returns an array with the new value added at the middle index of the given array.
Write a function called BinarySearch which takes in 2 parameters: a sorted array and the search key. Without utilizing any of the built-in methods available returns the index of the array’s element that is equal to the search key, or returns -1 if the element does not exist.
Find the height of the tree.
Add the sum of odd value in a tree
Breadth first traversal of a Tree data structure.
Write a function called Fibonacci which takes in a integer and returns a fibonacci number to it.
Learning queue data structure using objects. Create an Animal Shelter class that only accepts Cats or Dogs, and can Dequeue a Cat, a Dog, or the animal that has been in the shelter the longest.
Write a method that returns the maximum value in a Binary Tree of numeric values.
Replaces all the integer values in a binary tree with "Fizz" if they are divisible by 3, "Buzz" if divisible by 5, and "FizzBuzz" if divisible by both.
For a given integer n, generate all possible permutations of n pairs of parentheses, with all permutations being "code-legal"
Check whether a tree is balanced or not.
Add a new method to the LinkedList class that takes in an integer k and returns the value kth from the end of the array.
Perform a LEFT JOIN on two hash tables.
Create a static method that merges two Linked Lists, "zipping" their values together, and returns the merged list.
Verify if a given string contains code-valid bracket pairings.
The goal is to create Stack with queue properties. Create stack methods that behaves the same way as a queue.
Remove duplicate values in a linked list
Find the first repeated word in a lengthy string.
An algorithm that suffles the linked list
Find common nodes in two binary tree and output a list
Find the max depth of the binary tree
Check whether the path in a binary tree add up to the sum
Return a boolean value to indicate whether the sum of path is equal to the given sum.
Print all the paths in the binary tree, from root to all the leaves
Reverse all the characters in a string or word
Return all the unique integers in a 2D Array
Return the most frequent char in an array input
Construct a linked list
Construct stack and queue data structure
Construct a hash table data structure
Implement a HashTable class with Add, Contains, Get, and Hash methods.
Construct a graph data structure
An Insertion Sort Algorithm