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
MrRissso [65]
3 years ago
9

When is a base case needed for recursive processing?

Computers and Technology
1 answer:
Oksanka [162]3 years ago
3 0

Answer: Recursive processing or recursion is the technique in which a code calls itself in the same program in a direct or indirect manner in the computer program field.In general ,a stage of the procedure appeals the procedure itself.

Base case is the case required for the stopping of the recursion.After termination the returning process starts with the help of hierarchy calling. If there is no occurrence of base,then infinite recursion can take place.

                 

You might be interested in
What is one example of how teens use the internet and social media for cyberbullying
vovikov84 [41]

Cyberbullying occurs when individuals use technology to write aggressive, embarrassing, or hateful messages to/about peers in order to intimidate, harass, shame, and control.

7 0
3 years ago
Read 2 more answers
Write a program to declare a matrix A[][] of order (MXN) where ‘M’ is the number of rows and ‘N’ is the
Liula [17]

Answer:

import java.io.*;

import java.util.Arrays;

class Main {

   public static void main(String args[])

   throws IOException{

       // Set up keyboard input

       InputStreamReader in = new InputStreamReader(System.in);

       BufferedReader br = new BufferedReader(in);

 

       // Prompt for dimensions MxN of the matrix

       System.out.print("M = ");

       int m = Integer.parseInt(br.readLine());

       System.out.print("N = ");

       int n = Integer.parseInt(br.readLine());

       // Check if input is within bounds, exit if not

       if(m <= 2 || m >= 10 || n <= 2 || n >= 10){

           System.out.println("Matrix size out of range.");

           return;

       }

       // Declare the matrix as two-dimensional int array

       int a[][] = new int[m][n];

 

       // Prompt for values of the matrix elements

       System.out.println("Enter elements of matrix:");

       for(int i = 0; i < m; i++){

           for(int j = 0; j < n; j++){

               a[i][j] = Integer.parseInt(br.readLine());

           }

       }

       // Output the original matrix

       System.out.println("Original Matrix:");

       printMatrix(a);

       // Sort each row

       for(int i = 0; i < m; i++){

         Arrays.sort(a[i]);

       }

       // Print sorted matrix

       System.out.println("Matrix after sorting rows:");

       printMatrix(a);

   }

   // Print the matrix elements separated by tabs

   public static void printMatrix(int[][] a) {

       for(int i = 0; i < a.length; i++){

           for(int j = 0; j < a[i].length; j++)

               System.out.print(a[i][j] + "\t");

           System.out.println();

       }

   }

}

Explanation:

I fixed the mistake in the original code and put comments in to describe each section. The mistake was that the entire matrix was sorted, while only the individual rows needed to be sorted. This even simplifies the program. I also factored out a printMatrix() method because it is used twice.

4 0
3 years ago
What level does Drantini evolve? I'm currently grinding on my TI 84 calculator.
ad-work [718]

Answer:

Dratini first evolves into dragonair at level 30, which then later on evolves into dragonite at level 55.

4 0
3 years ago
Data that demonstrates no response to a variable shows what kind of data relationship?
kodGreya [7K]

Answer:

Non Related Data relationship

Explanation:

If one variable change and don's effect the other variable, there is no relationship between these two variable.

Direct relation means if data or value increase for on variable the value of other variable is also increases and if one decreases other is also decrease.

In indirect relation, if one value increase the other variable value decreases and vise versa.

In cyclic relationship the pattern repeats it self again and again with change in one variable.

So, if there is no effect on one variable by changing other variable there is non related relationship between them.

7 0
3 years ago
A system might help managers to
Minchanka [31]

Answer:Decisions are only as valid as the information on which they are based. Management information systems improve your decision-making, because they provide information that is accurate, timely, relevant and complete.

Explanation:

Decisions are only as valid as the information on which they are based. Management information systems improve your decision-making, because they provide information that is accurate, timely, relevant and complete.

5 0
3 years ago
Other questions:
  • Define the term Frame Rate.
    12·1 answer
  • If a suspect is not read his or her Miranda rights, then nothing the suspect says can be used at trial, even if the suspect volu
    11·1 answer
  • 2 A_______<br> uses graphics or pictures to help the user navigate and<br> access programs
    14·1 answer
  • True or False. A network is a group of computers that can communicate.
    8·1 answer
  • What is the difference between arithmetic and logical operations​
    8·1 answer
  • What type of data would a RDBMS store in a linked list, two-way linked list, or B-trees? What are the advantages and disadvantag
    5·1 answer
  • What can be used to store data, plant viruses, or steal data?
    13·1 answer
  • Fix the two words that are used incorrectly.
    10·2 answers
  • What adaptation Judy and her parents have that help them run from predators coming?​
    6·1 answer
  • What are the different methods of enhancing/decorating<br> bamboo product​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!