answersLogoWhite

0

Step 00: START.

Step 01: check the lengths of given strings are equal or not.

Step 02: if NO, go to step 12

Step 03: Sort letters of String1

Step 04: Sort letters of String2

Step 05: Get the length 'n' of any string (as they are same anyway)

Step 06: let variable p = '1'

Step 07: compare the letters of both strings at position 'p'

Step 08: if letters MISMATCH, go to step 12

Step 09: check if 'p' is greater than 'n'

Step 10: if NO increment 'p' by 1 and go to step 07

Step 11: OUTPUT à Input string are ANAGRAMS

Step 12: OUTPUT à Input string are NOT ANAGRAMS

Step 13: END

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How can the halting problem reduction be applied to determine the computability of a given algorithm?

The halting problem reduction can be used to determine if a given algorithm is computable by showing that it is impossible to create a general algorithm that can predict whether any algorithm will halt or run forever. This means that there are some algorithms for which it is impossible to determine their computability.


What is complsexity of an algorithm?

Complexity of an algorithm is a measure of how long an algorithm would take to complete given


A Write the algorithm to concatenate two given strings?

a write the algorithm to concatenate two given string


Is the halting problem a decidable problem?

No, the halting problem is undecidable, meaning there is no algorithm that can determine whether a given program will halt or run forever.


Is the halting problem undecidable?

Yes, the halting problem is undecidable, meaning that there is no algorithm that can determine whether a given program will halt or run indefinitely.


Write an algorithm to check whether the given number is odd or even?

Type your answer here... i think we should first enter 1 number then check it


Why algorithm needs to solve programming problem?

This is the definition of an algorithm - a list of orders of how to solve a given programming problem.


What is the proof of correctness algorithm and how does it ensure the accuracy and reliability of a given algorithm?

The proof of correctness algorithm is a method used to demonstrate that a given algorithm performs as intended and produces the correct output for all possible inputs. It involves creating a formal proof that the algorithm meets its specifications and behaves correctly under all conditions. By rigorously analyzing the algorithm's logic and structure, the proof of correctness ensures that it is accurate and reliable in its operations.


What is the word obtained after unscrambling the word eilf?

The anagrams are lief, life, and file. Also the given name Leif.


What is Vector generation algorithm?

It is a basic algorithm for generating lines on computer screen. line is generated between given 2 endpoints


In term of computer science what is deterministic algorithm?

In computer science, deterministic algorithm is an algorithm which, given a particular input, always produces the same result. This is used to increase the efficiency of machines.


Where is there a list of the Lewis Carroll anagrams?

There is no known comprehensive list of Lewis Carroll's anagrams, as he created many throughout his life in various writings. Some famous examples include "I am what I am" rearranged to "Taimataiwhaio," and "I lie" rearranged to "Elle." These anagrams showcase Carroll's clever wordplay and love for puzzles.