This repository contains the Hands On assignments for the course CSE 5311 (Design and Analysis of Algorithms) under Prof. Larz White at the University of Texas at Arlington
Details about Hands On 2 assignment
Direct Link to the folder - Hands_On_2
This assignment implements -
- insertion sort
- selection sort
- bubble sort
Each of the sorts have -
- source code -
insertion_sort.py
selection_sort.py
bubble_sort.py
- time vs input array size plot code (using mathplotlib) -
plot_insertion.py
plot_selection.py
plot_bubble.py
- image of the plot generated -
plot_insertionsort.png
selectionsort.png
plot_bubblesort.png
Additional files:
- computer information (work done on GitHub Codespaces) -
computer_benchmark_info.txt
- selection sort correctness -
selectionsort_correctness.py
- benchmark plot for the 3 sorting algorithms (python code and plot image) -
benchmark_sorting_algorithms.py
benchmark_sorting_algorithms.png
Details about Hands On 3 assignment
Direct Link to the folder - Hands_On_3
- Solution in the PDF
- Plot for time vs n
- time vs n plot:
timeplot.py
timeplot.png
- time vs n plot with polynomial fitting (w/ only original data points):
timeplot_fit.py
timeplot_fit.png
- time vs n plot with polynomial fitting (both graphs shown for comparision):
timeplot_fit_bounds.py
timeplot_fit_bounds.png
- time vs n plot:
- Bounds
- python code to showcase the lower and upper bounds on the plot w/ (time vs n) and polynomial graph:
timeplot_fit_bounds.py
- plot:
timeplot_fit_bounds.png
- more explaination about the bounds in the PDF
- python code to showcase the lower and upper bounds on the plot w/ (time vs n) and polynomial graph:
- n0 value
- python code to zoom in and mark the n0 value:
timeplot_fit_n0.py
- plot:
timeplot_fit_n0.png
- python code to zoom in and mark the n0 value:
- Solution in PDF
- Solution in PDF
- Merge sort:
merge_sort.c
Other files:
- PDF containing the non-coding solutions to some of the questions:
Hands_On_3_Solutions.pdf
Details about Hands On 4 assignment
Direct Link to the folder - Hands_On_4
Problem 0:
- Fibonacci sequence python implementation:
fibonacci_sequence.py
- Output screenshot:
fib_output.png
Problem 1:
- Code:
merge_arrays.py
- Output screenshot:
merge_output.png
Problem 2:
- Code:
remove_duplicates.py
- Output screenshot:
remove_duplicates_output.png
Solutions document for part 2 and 3 of Problems 1, 2: solutions.txt
Details about Hands On 5 assignment
- Min heap python implementation meeting all the specified requirements:
min_heap.py
- Examples of heap working (screenshots):
detailed output
simplified output
Details about Hands On 6 assignment
-
Q1:
- Random version:
quicksort_random.py
- Non - random version:
quicksort_nonrandom.py
- Output:
terminal_output_screenshot.png
- Random version:
-
Q2:
- Code:
quicksort_nonrandom_benchmarks.py
- Output:
quicksort_performance.png
- Code:
-
Q3:
Details about Hands On 8 assignment
-
Q1:
- Implementation of quicksort w/ the ith order statistic:
quicksort_i.py
- Output (examples):
output.png
- Implementation of quicksort w/ the ith order statistic:
-
Q2:
- Stack:
stack.c
- Output:
stack_output.mov
- Output:
- Queue:
queue.c
- Output:
queue_output.mov
- Output:
- Linked List:
linked_list.c
- Output:
linked_list_output.mov
- Output:
- Stack:
Details about Hands On 9 assignment
-
Hash Function:
hash_function.c
hash_function.h
-
Hash Table:
hash_table.c
hash_table.h
- The code allows for any hash function
-
Main Function:
main.c
-
Output:
output.txt
- Example array with size within the specified range
- Example array for growing the hash table
- Example array for shrinking the hash table
Details about Hands On 10 assignment
- Binary Search Tree
- Code:
bst.c
- Output:
bst_output.mov
- Code:
- AVL Tree
- Code:
avl.c
- Output:
avl_output.mov
- Code:
- Red Black Tree
- Code:
rb.c
- Output:
red_black_output.mov
- Code:
Details about Hands On 11 assignment
- Dynamic Array Implemtation:
- Code:
main.cpp
- Output:
main_output.png
- Code:
- Chapter 17 Homework:
- Solution:
chap17.txt
- Solution:
Details about Hands On 13 assignment
- Topological Sort:
topological_sort.py
- Depth First Search:
dfs.py
- Kruskal Algorithm:
kruskal.py
Details about Hands On 14 assignment
- Dijkstra's algorithm:
dijkstra.py
- Bellman-Ford algorithm:
bellman_ford.py
- Floyd-Warshall algorithm:
floyd_warshall.py