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
Degger [83]
3 years ago
14

You will be given a string, containing both uppercase and lowercase alphabets(numbers are not allowed).

Computers and Technology
1 answer:
murzikaleks [220]3 years ago
6 0

Answer:

The Java code is given below with appropriate comments

Explanation:

import java.util.*;

class Main {

   static Set<String> set = new HashSet();

   static void printPerms(char ch[], int ind){

       //If end of string is reached, add it to set

       if(ind==ch.length){

           set.add(new String(ch));

           return;

       }

       for(int i=ind;i<ch.length;i++){

           //Only swap if lower case

           if((ch[i]>='a' && ch[i]<='z')&&((ch[ind]>='a' && ch[ind]<='z'))){

               char t  = ch[i];

               ch[i] = ch[ind];

               ch[ind] = t;

           }

           printPerms(ch,ind+1);

           if((ch[i]>='a' && ch[i]<='z')&&((ch[ind]>='a' && ch[ind]<='z'))){

               char t  = ch[i];

               ch[i] = ch[ind];

               ch[ind] = t;

           }

       }

   }

   public static void main(String[] args) {

       printPerms("aBbCc".toCharArray(),0);

       System.out.println(set);

   }

}

You might be interested in
"the master boot record (mbr) method of partitioning hard drives is limited to what maximum size of drives
Vaselesa [24]
The answer is <span>2TB.  T</span>he master boot record (mbr) method of partitioning hard drives is limited to  2TB.  <span>The </span>Master Boot Record<span> (</span>MBR<span>) is the information in the first </span>sector<span> of any hard disk that identifies how and where an OS is located, so that it can be </span>boot<span> (loaded) into the computer's main storage or RAM.</span>
6 0
3 years ago
Daniel makes changes to a workbook named “Results.” He saves the file as “New Results” but did not realize that a worksheet name
elena55 [62]
All he would need to do is go into the sheet and change the name again. This will change the HTML so the computer will not be confused. The name should make sense, but he completely different from the original name :)
7 0
3 years ago
What is a good rule of thumb for how much white space you should have in a flyer or poster
almond37 [142]
Poster because if you have that much space....well what I do is calculate it by the centimeters in square divide:)
6 0
3 years ago
Read 2 more answers
A graphic design student is putting the finishing touches on her PowerPoint presentation for her speech. She is carefully analyz
elixir [45]

Answer:

Balance

Explanation:

Maintaining balance entails making sure things are in the right place, in the right proportion and maintaining a stable look and stand.

Maintaining a balance on a power point presentation entails that one considers these; ths one should carefully analyse how the different images go together and ensure that the positioning of elements within the images helps to make the individuals point and is pleasing to view.

This can be tasking but worth every effort put in to achieve such, because it will make your presentation to be easier to explain and better understood.

7 0
3 years ago
Meryll is thinking of creating a painting of a historical site. She has seen a similar painting put up online by another artist.
san4es73 [151]
I believe its c, the third option 
3 0
3 years ago
Other questions:
  • Which of the following statements is false? a. Classes (and their objects) encapsulate, i.e., encase, their attributes and metho
    15·1 answer
  • You have a hard disk that is formatted with the fat32 file system. you would like to implement file and folder permissions on th
    10·1 answer
  • ____ is the name of a particularly nasty automated program that attacks a network by exploiting Internet Protocol (IP) broadcast
    15·1 answer
  • What is the output of the following Java code?int x = 1;do{System.out.print(x + " ");x--;}while (x &gt; 0);System.out.println();
    14·1 answer
  • Which of these are forms of data? Check all that apply.
    8·2 answers
  • Match each scenario to the absolute value expression that describes it. 1. the distance moved when going backwards five spaces i
    13·2 answers
  • Seeing an error message on the screen after you click on a link or icon may indicate that your PC doesn't have the correct _____
    15·1 answer
  • 2. Released in 1992, Street Fighter II, the revolutionary fighting game, was developed by which company?
    8·2 answers
  • Fill in the blank: Every database has its own formatting, which can cause the data to seem inconsistent. Data analysts use the _
    13·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!