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 computer has best software
Kruka [31]
Dell computers have pretty good software.
4 0
3 years ago
Write a memo to the vice president, outlining the steps an employee might have taken to create an e-mail message and make it app
Natali [406]

Answer:

Following are the memo to the vice president:

Explanation:

In this question, the president claims, that he got a threatening e-mail from the Maui worker. HR acknowledged that all of the workers should always be dismissed, in its protection, that worker claims that he did not send the message but he does not recognize why the message implies him return address. Here is a note for the vice president, who explains how an employee could have produced an email and made it look to be from another worker's account. That stuff we want will be progressively explained as follows:

a) The manipulating and e-mail used only by spammers and attackers were called this technique. In the SMTP server, it sends messages, that you can set up to send your spammer to the email addresses. Instead of a mail confirmation, I d the forger requires the receiver to see the next employee I d email. that recipient doesn't understand who sent the message.

b) The e-mail Systems information allowing for accessible transfer is used by the intruder or forger. It  must use an attacker order to verify communication with the SMTP server command:  

telnet smpt.server.name 25    

Its name of the SMTP server is smpt.domain.name, and the port is 25.

c) when the last stage is successful as well as a link created, this order to imitate an email account only with command can be entered:

MAIL from: Email-id

It creates a problem for the worker that sends the e-mail with the same id

d) Hacker sets the email of the receiver to:  

RCPT to: boss email-id  

It sets the beneficiary as the e-mail above.  

e) By entering an order, you can create the email data:  

DATA It may also adjust the date by using command and Any date we would like to use.  

Date: (date you would like)  

We should settle on the following:  

Subject: (your topic)

f) We press Insert after the topic is written. In this body can then be e-mail forms. It produces the text.  

g) its email forged is forwarded.

3 0
3 years ago
To maintain her audience's confidence in her, what should kiara not do while delivering her presentation?
IrinaVladis [17]
Use filler words like ummmm, like, so, kinda, or such. Faltering on her words, forgetting things, or not saying things with confidence wouldn't help either. Also, do not loose eye contact with the people even if you only occasionally look up, it makes you look nervous and like you don't know what you're talking about.
7 0
3 years ago
What is the output of this code? import java.util.HashSet; class A { public static void main(String[ ] args) { HashSet set = new
kompoz [17]

Answer:

The code will give an error that is "At least one public class is required in main file".

Explanation:

In the given code if we do not use the public access modifier to the class. It will give an error so, the correct code to this question as follows:

Program:

import java.util.HashSet; //import package

public class A  //define class as public.

{

   public static void main(String[ ] args) //define main method.

   {

       HashSet set = new HashSet(); //creating hashset object.

       set.add("A"); //add alphabet in hashset

       set.add("B"); //add alphabet in hashset

       set.add("C"); //add alphabet in hashset

       System.out.print("Size of HashSet is :"set.size()); //print the size of hashset.

   }

}

Output:

Size of HashSet is : 3

Explanation of the program:  

  • In the above program, we define a public class that is "A" and inside the class, we define the main method.  
  • Inside the main method, we create a HashSet class object that is "set".  
  • To add elements in HashSet we use add() function that adds elements and in the last, we use the size() function that prints the size HashSet.
5 0
3 years ago
What is a guardian node summary for theta staking tool
Diano4ka-milaya [45]

Answer: Theta Guardian

Explanation:

THETA is used to stake as a Validator or Guardian node, contributing to block production and the protocol governance of the Theta Network. By staking and running a node, users will earn a proportional amount of the new TFUEL generated. Relayers earn TFUEL for every video stream they relay to other users on the network.

3 0
2 years ago
Other questions:
  • Assume that an int variable age has been given a value. Assume further that the user has just been presented with the following
    14·1 answer
  • Which command would you use to swap the words hither and yon on any line with any number of words between them? (You need not wo
    5·1 answer
  • 8.7 lesson practice question 1
    13·1 answer
  • Mark is flying to Atlanta. The flight is completely full with 200 passengers. Mark notices he dropped his ticket while grabbing
    15·1 answer
  • Please help!!! I am very confused about this question!
    10·1 answer
  • Match the hardware device with the "category" into which it falls. Remember to choose
    8·1 answer
  • A (n) ___ system can help a business alleviate the need for multiple information systems.
    13·1 answer
  • 1. why is manufacturing considered the biggest contributor to progress
    9·1 answer
  • Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    6·1 answer
  • ____ characterized the period now known a Web 1. 0. Augmented reality
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!