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 key invention that enabled computers to go into every home and office is
tatiyna

The answer is the microprocessor


7 0
3 years ago
Anyone else like hunter x hunter?<br> lets talk abt it uwu<br><br> good day :)
Aleks [24]

Answer:

mid

Explanation:

3 0
3 years ago
Read 2 more answers
Which IDS/IPS detection method uses previously gained connection attributes to match traffic against predetermined profiles
natulia [17]

Answer:

Stateful protocol analysis detection.

Explanation:

IDS and IPS are acronym for intrusion detection system and intrusion prevention system respectively. IDS is a security system which monitors the network traffic and notifies the engineer when there's a malicious activity. IPS is a security system which monitors the network traffic and blocks malicious activity as well as keeping logs.

Generally, the detection methods used by the Intrusion Prevention Systems (IPS) are;

1. Statistical anomaly-based detection.

2. Signature-based detection.

3. Stateful protocol analysis detection.

Stateful protocol analysis detection is an IDS/IPS detection method that uses previously gained connection attributes to match traffic against predetermined profiles.

Basically, these predetermined profiles comprises of benign activities and suspicious activities that have been developed by industry leaders and vendors as abnormal systems or network behaviors.

6 0
3 years ago
What are the advantages and disadvantages of using steganography versus symmetric or asymmetric encryption
ankoles [38]

<u>Explanation:</u>

Steganography is a technique used in securing or hiding sensitive information by encrypting the information in a non-hidden file like a JPEG format. A major <u>advantage</u> of this method is that it reduces the risk of attack or break-in since the data is enclosed in a non-secure file; thereby reducing threats of any hack. One main<u> disadvantage</u> of this method is that the hidden message may become difficult to recover if the source file (non-secure file) used, is edited or deleted.

In symmetric or asymmetric encryption they both employ cryptographic encryption method. While symmetric encryption uses one key to encrypt and decrypt data, asymmetric encryption uses two keys (one for encryption, the other for decryption) of the data. <u>A major </u><u>advantage</u><u> of using these methods is that they provide more security. Although while symmetric encryption is faster, asymmetric encryption is slower (eg using separate keys to gain access), </u><u>a disadvantage.</u>

6 0
3 years ago
Define a function pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a pyram
olga_2 [115]

Answer:

Following are the program in Python programming language

def pyramid_volume(base_length,base_width,pyramid_height):

base_area=base_length*base_width

volume=base_area*pyramid_height*(1/3)

return volume

print('volume for 4.5,2.1,3.0 is:',pyramid_volume(4.5,2.1,3.0))

Explanation:

Here, we define a function "pyramid_volume()" and pass an arguments "base_length,base_width,pyramid_height"

inside that program we have calculated the area of the pyramid and after that we have calculated the volume of that pyramid and return the volume.

Outside of the function we have called the function by passing the arguments.

4 0
4 years ago
Other questions:
  • To include an online picture in a publication, navigate to the _____ tab.
    7·1 answer
  • 11. The golden rule of safe driving is: A. Always drive at the posted speed limit B. Never drive while physically or mentally im
    15·1 answer
  • Search engines are used to find a specific entry in a database.<br><br> True or false?
    9·2 answers
  • ¿dispositivos de hardware Que permite identificar la huella digital registrada por el usuario?
    11·1 answer
  • How do mass and social media differ
    8·1 answer
  • When creating envelopes, how will you adjust the layout?
    10·2 answers
  • What is suitable equipment to meet customer needs from
    10·1 answer
  • How does the dns solve the problem of translating domain names like example.com into ip addresses?
    10·1 answer
  • How to give answer like this?????
    14·1 answer
  • A coffee shop is considering accepting orders and payments through their phone app and have decided to use public key encryption
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!