Which Of The Following Should Be The Base Case For The #291
Which of the following should be the base case for the recursive solution of subset sum problem?
This multiple choice question (MCQ) is related to the book/course gs gs122 Data Communication and Computer Network. It can also be found in gs gs122 Checksum Complexity Classes and NP-Complete Problems - Subset Sum Problem - Quiz No.1.
Which of the following should be the base case for the recursive solution of subset sum problem?
if(sum==0) return true;
if(sum==0) return true; if (n ==0 && sum!= 0) return false;
if (n ==0 && sum!= 0) return false;
if(sum<0) return true; if (n ==0 && sum!= 0) return false;
Similar question(s) are as followings:
Online Quizzes of gs122 Data Communication and Computer Network
Sorting - Insertion Sort - Quiz No.1
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - Insertion Sort - Quiz No.2
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - Insertion Sort - Quiz No.3
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - LSD Radix Sort - Quiz No.1
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - MSD Radix Sort - Quiz No.1
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - MSD Radix Sort - Quiz No.2
gs gs122 Data Communication and Computer Network
Online Quizzes