This repository contains the codes pertaining to the weekly programming assignments of the course Algorithms-1 at IIT Kharagpur during the session of Spring 2020.
A brief description of the contents of the folders is provided below. The links take to the files inside them.
ID | Topic | Brief description |
---|---|---|
A0 | Introductory | Implementation of the entire calendar of a given year in a 2D Linked List like data structure given the day on 1st January. |
A1 | Running time of algorithms | A recurrence relation based question and an array problem. |
A2 | Recursion | Recursive enumeration of all possible ways of writing a number as an arithmetic expression using only 1 , + , and x (brackets allowed). |
A3 | Divide-and-Conquer | Implementation of a geometric algorithm for finding the region of visibility from y-infinity given a set of straight lines on a plane. |
A4 | Greedy | Finding minimum no. of steps of reducing a number to 1 using only decrement and divide by 2 operations. |
A5 | Dynamic programming | A knapsack like pseudo polynomial time combinatorial optimization problem. |
A6 | Binary tree | Converting a binary tree into a binary search tree using rotation, childswap, bubble sort and rebalance operations. |
A7 | Binary search tree | Finding all possible permutations of an array that generate the same binary search tree. |
A8 | Heap | Implementation of a binary heap like data structure with each node storing multiple key values. |
A9 | Graph traversal | Finding monochromatic and multi-color cycles using DFS in an undirected graph with nodes colored in blue or red. |
AA | Shortest paths | Implementation of Floyd Warshall algorithm for directed graphs. |
LT | Dynamic programming | Finding the largest rectangular chessboard in a binary matrix. |