1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vedmedyk [2.9K]
2 years ago
6

Write a recursive function named canmakesum that takes a list of * integers and an integer target value (sum) and returns true i

f it is * possible to have some set of values from the list that sum to the * target value.
Computers and Technology
1 answer:
valentinak56 [21]2 years ago
7 0

// Java program to find sum of array

// elements using recursion.

class Test {

   static int arr[] = { 1, 2, 3, 4, 5 };

   // Return sum of elements in A[0..N-1]

   // using recursion.

   static int findSum(int A[], int N)

   {

       if (N <= 0)

           return 0;

       return (findSum(A, N - 1) + A[N - 1]);

   }

   // Driver method

   public static void main(String[] args)

   {

       System.out.println(findSum(arr, arr.length));

   }

}

You might be interested in
What is BINARY it is making get confused
enot [183]
It is a number that is expressed in the binary numerical system
6 0
3 years ago
After sending input in the Chinese language to an AI system, Nina got numerous translations in the English language. Which chall
ad-work [718]

Answer:

i think its translation complexity

Explanation:

8 0
3 years ago
What specific type of DNS query instructs a DNS server to process the query until the server replies with an address that satisf
Kaylis [27]
Unsure how it is to be answered
8 0
3 years ago
Help Menu is available at which button in the keyboard?
kvasek [131]
Answer: It should be F1.
6 0
3 years ago
What command is used to locate all occurrences of the word "dog" in a document?
rosijanka [135]

Microsoft Word can easily find text in your document. This search is handled by the Find command. To locate the occurrences of the word dog in a word document, you can either click the find button on the home tab or press the combination keys ctrl+F and type the word dog. You also press ctrl+G. The Find and Replace dial box will pop up, with the Go To tab displayed. You will go ahead and click the Find tab and type the word dog.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a void function SelectionSortDescendTrace() that takes an integer array, and sorts the array into descending order. The fu
    9·1 answer
  • What is the difference between deta security and privecy ?
    12·2 answers
  • In report design view, you can use commands on the align button of the _____ tab.​
    11·1 answer
  • When you compose a message, you want your audience to find the information it needs quickly and to understand what it finds. You
    11·1 answer
  • In JavaScript, which of the statements below can be used for string declaration?
    11·1 answer
  • The__ key is used to group or identify a field or record within a table. (you don't need it).
    5·2 answers
  • Please HELP me it a test and it due rn. Please no links
    9·1 answer
  • )
    11·1 answer
  • what impact of information communication technology have on the environment about electronic waste, use of electricity?​
    9·1 answer
  • Define a function that will return the length of a list
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!