In dynamic programming, the 0/1 Knapsack problem with n items and capacity W has time complexity
Asked in TPSC Junior System Engineer 2026
Answer under review: our editors are checking this question. Try the other TPSC Prelims previous year questions questions meanwhile.
More TPSC Prelims previous year questions questions
- Kruskal’s algorithm for MST sorts edges by weight and adds them if they don’t form a cycle. What data structure efficiently supports the cycle-detection step ?
- Which asymptotic notation represents a tight bound — both upper and lower ?
- The Bellman-Ford algorithm detects negative weight cycles by
- In the Divide-and-Conquer approach, Strassen’s matrix multiplication reduces the number of recursive multiplications per 2×2 matrix from 8 to
- A problem is said to be NP-hard if :
- Which graph traversal algorithm is used to detect strongly connected components (SCCs) ?
- The Greedy algorithm for Activity Selection Problem works because the problem exhibits which property ?
- What is the time complexity of the Floyd-Warshall all-pairs shortest path algorithm ?