Q. What is the time complexity of the brute force algorithm used to solve the balanced partition problem?

  • (A) o(1)
  • (B) o(n)
  • (C) o(n2)
  • (D) o(2n)
πŸ’¬ Discuss
βœ… Correct Answer: (D) o(2n)
Explanation: in the brute force implementation, all the possible subsets will be formed. this takes exponential time.

Explanation by: Mr. Dubey
in the brute force implementation, all the possible subsets will be formed. this takes exponential time.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
96
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
84%
Success Rate