-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/mpektkd/Algorithms-Comple…
- Loading branch information
Showing
4 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
### Problems through several programming languages | ||
|
||
> - Representation of a number with powers of 2. | ||
> - Implementation of BFS Algorithm in a funny version. | ||
> - Implementation of BFS Algorithm in a funny version(StayHome). | ||
> - DFS Implementation in a funny version detecting Corona Virus | ||
> - Stacks finding Vaccine for Corona |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
### Problem 2: Vaccine 💉 (Java Implementation) | ||
|
||
Given a stack of RNA nitrogenous bases ("A", "U", "G", "C"), we consider the following possible moves that we can do, in order to create another stack in which all the nitrogenous bases of the given stack are in groups (all "A"s together, all "T"s together and so on). The moves are: | ||
|
||
- "p" (push): removes the top base from the given stack and puts it on top of the new stack | ||
- "c" (comlement): replaces all the bases from the given stack with their complementary ones ("A" ↔️ "U", "C" ↔️ "G") | ||
- "r" (reverse): turns the new stack's content upside-down | ||
|
||
The program should print the shortest (on a tie, the lexicographicaly smallest) sequence of moves that need to be done, in order the create the above mentioned stack. |