I'm always excited to take on new projects and collaborate with innovative minds.

Email

contact@niteshsynergy.com

Website

https://www.niteshsynergy.com/

assignmentwala

📝 100+ Assignments: Basics + Mathematics for DSA


Part 1: Time and Space Complexity (50+ assignments)

A. Concepts and Analysis

  1. Explain Big-O notation with 5 original examples.

  2. Explain Big-Theta notation with 3 original examples.

  3. Explain Big-Omega notation with 3 original examples.

  4. Analyze time complexity of linear search in best, average, and worst cases.

  5. Analyze time complexity of binary search in best, average, and worst cases.

  6. Analyze space complexity of recursive Fibonacci.

  7. Calculate time complexity of bubble sort in all cases.

  8. Calculate time complexity of insertion sort in all cases.

  9. Calculate time complexity of merge sort.

  10. Calculate time complexity of quicksort and explain pivot choice effects.

  11. Calculate space complexity of merge sort.

  12. Compare space vs time trade-off in merge sort vs quicksort.

  13. Time complexity of a balanced binary search tree operations.

  14. Explain amortized time complexity with stack push/pop.

  15. Calculate time complexity for matrix multiplication naive approach.

  16. Calculate time complexity for matrix multiplication using Strassen’s algorithm.

  17. Explain why hashmap operations are average O(1) but worst-case O(n).

  18. Calculate time complexity of naive substring search.

  19. Calculate time complexity of KMP substring search.

  20. Explain how caching (memoization) improves time complexity for Fibonacci.

  21. Analyze time complexity of DFS and BFS on graphs.

  22. Calculate space complexity of DFS and BFS.

  23. Analyze time complexity of Dijkstra’s shortest path algorithm.

  24. Analyze space complexity of Dijkstra’s algorithm.

  25. Calculate complexity of Prim’s and Kruskal’s MST algorithms.

  26. Explain time complexity of heap operations.

  27. Implement and analyze complexity of priority queue insert/extract.

  28. Calculate time complexity of n-queens problem brute force.

  29. Calculate time complexity of backtracking Sudoku solver.

  30. Analyze recursive vs iterative factorial time and space complexity.

  31. Explain complexity of exponentiation by squaring.

  32. Compare iterative vs recursive binary search.

  33. Analyze complexity of array vs linked list insertion/deletion.

  34. Calculate complexity of dynamic array resizing.

  35. Explain time complexity of hash collision resolution methods (chaining, open addressing).

  36. Analyze space complexity of trie data structure.

  37. Calculate time complexity of radix sort.

  38. Compare time complexity of different sorting algorithms on nearly sorted data.

  39. Calculate complexity of counting sort.

  40. Analyze worst-case scenario for quicksort.

  41. Explain time-space trade-offs with example of lookup tables.

  42. Analyze time complexity of substring search with Rabin-Karp.

  43. Calculate complexity of finding duplicates using sorting vs hashing.

  44. Analyze the complexity of string reversal.

  45. Explain time complexity of palindrome checking.

  46. Calculate time complexity of all pairs shortest path (Floyd-Warshall).

  47. Compare complexity of BFS vs DFS for cycle detection.

  48. Calculate complexity of dynamic programming solutions for Fibonacci.

  49. Explain time complexity of topological sort.

  50. Analyze complexity of graph coloring heuristics.


Part 2: Mathematics for DSA (50+ assignments)

Prime Numbers and Sieve

  1. Implement and analyze sieve of Eratosthenes for primes up to 10^5.

  2. Modify sieve to return prime count up to N.

  3. Find sum of primes up to 10^6 using sieve.

  4. Count twin primes up to 10^6.

  5. Implement naive prime checker using trial division.

  6. Compare sieve and naive prime checker performance.

  7. Implement segmented sieve for range [L, R].

  8. Use sieve to factorize numbers up to 10^6.

  9. Find largest prime factor of a number using sieve.

  10. Implement prime checking using Miller-Rabin test.

  11. Generate all primes between 1 and 10^7 using sieve.

  12. Find prime gaps between consecutive primes up to 10^6.

  13. Find first 100 primes.

  14. Find sum of first N primes.

  15. Check if number is perfect square of a prime.

  16. Find primes in arithmetic progression using sieve.

  17. Count prime numbers in a large interval efficiently.

  18. Calculate product of primes up to N modulo M.

  19. Implement Eratosthenes sieve with bitset optimization.

  20. Find the smallest prime factor for all numbers up to N.

  21. Check Goldbach’s conjecture for even numbers up to 10^6.

  22. Find number of primes with digit sum equal to X.

  23. Find primes with palindrome property.

  24. Find next prime number after N.

  25. Calculate Euler’s Totient function for numbers up to N.

  26. Calculate GCD using Euclidean Algorithm.

  27. Implement Extended Euclidean Algorithm.

  28. Solve linear Diophantine equations using extended Euclidean.

  29. Calculate LCM using GCD.

  30. Implement fast modular exponentiation.

  31. Use modular exponentiation to compute large powers modulo M.

  32. Calculate modular inverse using Fermat’s little theorem.

  33. Implement combinatorial nCr using Pascal’s triangle.

  34. Precompute factorials and inverse factorials modulo M for fast nCr.

  35. Implement Lucas theorem for large nCr modulo prime.

  36. Use prefix sums to answer range sum queries.

  37. Implement difference array for range update and point query.

  38. Use prefix sums in 2D arrays.

  39. Solve subarray sum problems using prefix sums.

  40. Implement bit manipulation for counting set bits.

  41. Use bit manipulation to generate all subsets of a set.

  42. Implement Brian Kernighan’s algorithm for bit counting.

  43. Use bitmask DP to solve subset sum problem.

  44. Find XOR of all elements in an array.

  45. Implement left and right bit shifts and explain effect.

  46. Solve problems involving checking power of two using bits.

  47. Implement and explain combinatorial permutations (nPr).

  48. Calculate number of derangements for n elements.

  49. Solve problems combining prefix sums and combinatorics.

  50. Explain how modular arithmetic applies to hash functions.


Optional stretch tasks

  1. Implement segmented sieve for prime factorization on huge ranges.

  2. Use sieve to solve prime factor queries online.

  3. Implement multiplicative inverse using extended Euclidean.

  4. Create a mini library for modular arithmetic (add, subtract, multiply, divide).

  5. Compare iterative vs recursive factorial with memoization.

  6. Optimize prefix sums for dynamic arrays.

  7. Use Fenwick tree or Segment tree to answer prefix sum queries with updates.

  8. Implement fast exponentiation for matrices.

  9. Explore connections between combinatorics and probability in algorithms.

  10. Solve classic combinatorial puzzles using code (e.g., Catalan numbers).