How bansal-yash/col106-data-structures-and-algorithms works
This repository is a collection of seven independent COL106 assignment products, not one application. Users submit operations, expressions, banking queries, or corpus questions; each assignment processes them with its own data structures and returns results. The README documents set operations, stack-based postfix calculation, hash-based banking, two expression tools, document search, and corpus Q&A with BM25-ranked context and model APIs. The graph preserves those separate workflows. Several implementations were not sampled, so links for those are based only on README descriptions; the part1 Q&A search excerpt is a stub, while part2 contains the sampled Q&A implementation.
Main entry points: qna_tool.cpp Q&A workflow · Assignment_3_Banking_Database_Hashing Banking operations · Assignment_2_Stack Postfix calculator · evaluator.cpp Expression evaluator
Components 30
Sets and stacks
- Set operations
Assignment_1_Sets/main.cpp - Postfix calculator
Assignment_2_Stack - Stack A
Assignment_2_Stack/stack_a.cpp - Stack B
Assignment_2_Stack/stack_b.cpp - Stack C
Assignment_2_Stack/stack_c.cpp
Banking database
- Banking operations
Assignment_3_Banking_Database_Hashing - Chaining hash
Assignment_3_Banking_Database_Hashing/Chaining.cpp - Linear probing
Assignment_3_Banking_Database_Hashing/LinearProbing.cpp - Quadratic probing
Assignment_3_Banking_Database_Hashing/QuadraticProbing.cpp - Cubic probing
Assignment_3_Banking_Database_Hashing/CubicProbing.cpp
Expression tools
- Expression evaluator
Assignment_4_Expression_Evaluator/evaluator.cpp - Evaluator entry
Assignment_4_Expression_Evaluator/entry.cpp - Parse tree
Assignment_4_Expression_Evaluator/exprtreenode.cpp - Symbol table
Assignment_4_Expression_Evaluator/symtable.cpp - Unlimited integers
Assignment_4_Expression_Evaluator/ulimitedint.cpp - Unlimited rationals
Assignment_4_Expression_Evaluator/ulimitedrational.cpp - Expression compiler
Assignment_5_Expression_Compiler/eppcompiler.cpp - Expression parser
Assignment_5_Expression_Compiler/parser.cpp - Expression tree
Assignment_5_Expression_Compiler/exprtreenode.cpp - Compiler symbols
Assignment_5_Expression_Compiler/symtable.cpp - Memory heap
Assignment_5_Expression_Compiler/minheap.cpp
Document processing
- Document dictionary
Assignment_6_Document_Processor_Dictionary/dict.cpp - Sentence search
Assignment_6_Document_Processor_Dictionary/search.cpp
Corpus Q&A
- Q&A workflow
Assignment_7_Corpus_QnA_Tool/part2_final/qna_tool.cpp - Paragraph index
Assignment_7_Corpus_QnA_Tool/part2_final/dict.cpp - BM25 ranking
Assignment_7_Corpus_QnA_Tool/part2_final/qna_tool.cpp - ChatGPT API
Assignment_7_Corpus_QnA_Tool/part2_final/api_call.py - Hugging Face API
Assignment_7_Corpus_QnA_Tool/part2_final/api_hugchat.py
Other components
- User
- Model service
Connections 31
- User → Set operations: requests set operations
- User → Postfix calculator: enters postfix expression
- Postfix calculator → Stack A: uses stack variant
- Postfix calculator → Stack B: uses stack variant
- Postfix calculator → Stack C: uses stack variant
- User → Banking operations: submits banking operations
- Banking operations → Chaining hash: selects hash strategy
- Banking operations → Linear probing: selects hash strategy
- Banking operations → Quadratic probing: selects hash strategy
- Banking operations → Cubic probing: selects hash strategy
- User → Evaluator entry: submits expression
- Evaluator entry → Expression evaluator: dispatches evaluation
- Expression evaluator → Parse tree: uses parse tree
- Expression evaluator → Symbol table: consults symbols
- Expression evaluator → Unlimited rationals: evaluates rational operations
- Unlimited rationals → Unlimited integers: uses integer arithmetic
- User → Expression compiler: submits program
- Expression compiler → Expression parser: parses statements
- Expression parser → Expression tree: builds expression tree
- Expression parser → Compiler symbols: updates symbols
- Expression compiler → Memory heap: uses memory allocation
- User → Document dictionary: provides document words
- User → Sentence search: submits search pattern
- User → Q&A workflow: asks corpus question
- Q&A workflow → Paragraph index: indexes paragraph terms
- Q&A workflow → BM25 ranking: ranks relevant paragraphs
- BM25 ranking → Q&A workflow: returns ranked context
- Q&A workflow → ChatGPT API: dispatches answer request
- Q&A workflow → Hugging Face API: dispatches answer request
- ChatGPT API → Model service: calls model API
- Hugging Face API → Model service: calls model API