Skip to content

dev-pasa/data-structures-and-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data-structures-and-algorithms

  • 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.

My primary focus will be on three main things:

  • 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.

Challenges:

  1. Array Shift
  • 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.
  1. Binary Search
  • 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.
  1. Tree Height
  • Find the height of the tree.
  1. Binary Tree Sum of Odds
  • Add the sum of odd value in a tree
  1. Tree Breadth First Traversal
  • Breadth first traversal of a Tree data structure.
  1. Fibonacci Sequence
  • Write a function called Fibonacci which takes in a integer and returns a fibonacci number to it.
  1. Queue Animal Shelter
  • 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.
  1. Max Value Binary Tree
  • Write a method that returns the maximum value in a Binary Tree of numeric values.
  1. FizzBuzz Tree
  • 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.
  1. Generate Balanced Paretheses
  • For a given integer n, generate all possible permutations of n pairs of parentheses, with all permutations being "code-legal"
  1. Is Tree Balanced?
  • Check whether a tree is balanced or not.
  1. Linked List kth Node From End
  • 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.
  1. HashTable Left Join
  • Perform a LEFT JOIN on two hash tables.
  1. Merge Linked List
  • Create a static method that merges two Linked Lists, "zipping" their values together, and returns the merged list.
  1. Multi Bracket Validation
  • Verify if a given string contains code-valid bracket pairings.
  1. Pseudo Queue
  • The goal is to create Stack with queue properties. Create stack methods that behaves the same way as a queue.
  1. From Sorted Linked List Remove Duplicates
  • Remove duplicate values in a linked list
  1. Check Repeat Words
  • Find the first repeated word in a lengthy string.
  1. Shuffle Linked List
  • An algorithm that suffles the linked list
  1. Tree Intersection
  • Find common nodes in two binary tree and output a list
  1. Tree Max Depth
  • Find the max depth of the binary tree
  1. Path in tree equals given int value
  • 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.
  1. Print all the paths in binary tree
  • Print all the paths in the binary tree, from root to all the leaves
  1. Reverse Characters in a string
  • Reverse all the characters in a string or word
  1. Unique Integers in a 2D Array
  • Return all the unique integers in a 2D Array
  1. Most Frequent Character in an array
  • Return the most frequent char in an array input

Data Structures:

  1. Linked list
  • Construct a linked list
  1. Stacks and Queues
  • Construct stack and queue data structure
  1. Tree
  • Construct a hash table data structure
  1. HashTable
  • Implement a HashTable class with Add, Contains, Get, and Hash methods.
  1. Graph
  • Construct a graph data structure

Sorting Algorithms:

  1. Insertion Sort
  • An Insertion Sort Algorithm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages