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
Mr. Andrews, the lead programmer for the game New Horizons, hires independent testers to check the game for stability and perfor
NikAS [45]
I think “D”, did I help?
5 0
3 years ago
Read 2 more answers
DO, of X isvvvvvvvvvvvvvvv
dem82 [27]
Huh ? I don’t understand the question
8 0
3 years ago
What are 3 things that can make cyberbullying especially harmful​
motikmotik

Answer:

Anxiousness and depression

Suicidal Thoughts

Anger

Explanation:

Three major side affects of cyber bullying are

  1. Anxiousness and depression
  2. Suicidal Thoughts
  3. Anger

Anxiousness and depression

Cyber bullying takes away self esteem and self confidence.Lack of self esteem makes person to feel bad about him/her self and lack of confidence makes taking daily life decision very difficult which all adds up to stress

Anger

Some people might feel powerless while others strike back on the bullies in anger.Unchecked anger can be very dangerous.Burning in the flames of anger a person will plot revenge and can go to any means for this. This starts a never ending bully-victim cycle

Suicidal Thoughts

Depression if not cured can lead to suicidal thoughts. When a person is felling low and have no self confidence death seems an easy way out.

3 0
3 years ago
Who is familiar with Pixlr E.com on here????!!!!!
dsp73

meAnswer:

Explanation:

5 0
3 years ago
What term describes the order an arragement of files and folders on a computer
astra-53 [7]
I think the answer you are looking for is just simply Organization

7 0
3 years ago
Other questions:
  • Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
    7·1 answer
  • A(n) _____ allows a user to choose specific files to back up, regardless of whether or not the files have been changed.
    9·1 answer
  • Of the three different types of résumé formats (chronological, functional, or combination), which format would you use to create
    11·2 answers
  • Which option is most likely used to create many-to-many relationships in Access?
    8·1 answer
  • What does the headgear of a mine do
    6·2 answers
  • Would you buy a 2017 SYM WOLF CLASSIC 150 for $2,999?<br><br> Just wondering.
    7·1 answer
  • If your machine is not used as a server and is not on a local network, what packet-filtering strategy should you use?A. Block al
    12·1 answer
  • A _________ is a task at the lowest level of the WBS that represents the level of work that the project manager uses to monitor
    5·1 answer
  • I'm not sure how to do these. By the way, it has to be python.
    13·1 answer
  • Exam Instructions
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!