Time Complexity questions
5 job-exam questions on Time Complexity from 5 papers — DPDC, BPSC, NPCBL and more — with answers and discussion.
Papers
- October 2026 – Written (BPSC) — BPSC · Assistant Programmer (CSE)
- June 2026 – Written (BUET) — NPCBL · Engineer (CSE)
- June 2025 – Written (BUET) — DPDC · Junior Assistant Manager (ICT)
- June 2025 – Written (BUET) — DPDC · Assistant Manager (ICT)
- 2020 – Written (BUET) — DPDC · Junior Assistant Manager (ICT)
Questions
- যে কোন একটা array নাও, সেই array থেকে একটি সংখ্যার binary search করার step গুলো লিখ এবং এর time complexity কত হবে তা বের কর।
- Analyze the time and space complexity of the following code: for i in N: for j in M: print(i, j)
- What is the time complexity of binary search?
- Write the best case, worst case, and average case time complexity for the following sorting algorithms. Algorithm Best case Worst Case…
- Sort the following time complexities in order of execution speed, from slowest to fastest, assuming a sufficiently large input size n. O(…