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
Rus_ich [418]
3 years ago
13

In Java, it is not possible for a method to call itself? (true,false)

Computers and Technology
1 answer:
IgorC [24]3 years ago
4 0

Answer:

false

Explanation:

You could just call a method itself and just have a condition to get out. For example an recursive method with a base case.

You might be interested in
Which of the following activities can cause data to be damaged or lost?
jekas [21]
Illegal access to a system
3 0
3 years ago
You are given a list of n positive integers a1, a2, . . . an and a positive integer t. Use dynamic programming to design an algo
Anna11 [10]

Answer:

See explaination for the program code

Explanation:

The code below

Pseudo-code:

//each item ai is used at most once

isSubsetSum(A[],n,t)//takes array of items of size n, and sum t

{

boolean subset[n+1][t+1];//creating a boolean mtraix

for i=1 to n+1

subset[i][1] = true; //initially setting all first column values as true

for i = 2 to t+1

subset[1][i] = false; //initialy setting all first row values as false

for i=2 to n

{

for j=2 to t

{

if(j<A[i-1])

subset[i][j] = subset[i-1][j];

if (j >= A[i-1])

subset[i][j] = subset[i-1][j] ||

subset[i - 1][j-set[i-1]];

}

}

//returns true if there is a subset with given sum t

//other wise returns false

return subset[n][t];

}

Recurrence relation:

T(n) =T(n-1)+ t//here t is runtime of inner loop, and innner loop will run n times

T(1)=1

solving recurrence:

T(n)=T(n-1)+t

T(n)=T(n-2)+t+t

T(n)=T(n-2)+2t

T(n)=T(n-3)+3t

,,

,

T(n)=T(n-n-1)+(n-1)t

T(n)=T(1)+(n-1)t

T(n)=1+(n-1)t = O(nt)

//so complexity is :O(nt)//where n is number of element, t is given sum

6 0
3 years ago
The insertion sort algorithm sorts using what technique?
QveST [7]

Answer:

Iteration

Explanation:

The insertion sort is based on repetition of comparing one data array (or element in a list) with the others at its left to reorganize it, normally following a size criteria (from small to big or the other way around).

At each iteration, the algorithm takes one element and compares it one by one to the others until it fit the specified criteria. Later on, it creates a space, moving the other elements, to insert it. Later, it  goes to the next element and the iteration repeats all the way through. It has some advantages over other sorting algorithms because it is easy to deploy and program it in many different languages, but at the same time it can be terribly slow when sorting large amount of data.

7 0
3 years ago
When Kim was working in her Microsoft® Excel® spreadsheet, she accidentally placed her book on the spacebar and erased the conte
zaharov [31]

Answer:

The undo tool.

Explanation:

Microsoft Excel is a spreadsheet application developed by Microsoft, it is used for analysing data. It's worksheets are made up of columns and rows or fields and records.

There are different ways of entering data to a cell. Click on the cell and type the data, copy and paste to the target cell, double-click on the cell to correct data and click on a cell and press the spacebar key to clear the data.

Excel records the action of event, so when a mistake is made like deleting a crucial cell data value, the undo tool is used to recover the data, since it holds records of events. The redo tool is the reverse of the undo tool.

5 0
3 years ago
When the writer of a letter sends a copy to a third party without the knowledge of the person receiving the original letter, it
ahrayia [7]

The answer here is Blind carbon copy (bcc).

The original recipients of the letter are unable to see (blind) who else receives a copy if those parties are on the bcc list.

3 0
3 years ago
Other questions:
  • Create a function average_temp(s) that accepts a file name s that contains temperature readings. Each line in the file contains
    15·1 answer
  • Using tracking code, google analytics can report on data from which systems?
    7·1 answer
  • If all of Earth's history were squeezed into one 12-hour period, how long ago did Precambrian time end? How long did the Cenozoi
    15·1 answer
  • Describe how one device can send a bit to another device.
    9·1 answer
  • Ryan wants to ensure that all the words in this document are evenly spaced so that they look neat and readable . Which option in
    12·1 answer
  • Which statement best explains taxation without representation was a major issue for colonists?
    12·1 answer
  • How does virtualization factor into a layered vs. non-layered design discussion?
    14·2 answers
  • To exclude members of a group from the basic permissions for a folder, which type of permission would you assign? Deny Allow Mod
    13·1 answer
  • WHO HAS TWITCH<br> PLS FOLLOW ME MY TWITCH IS giaplayzgamez I'm uploading Videos Soon.
    11·2 answers
  • Write a method that takes a Rectangle as a parameter, and changes the width so it becomes a square (i.e. the width is set to the
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!