Skip to content

Commit

Permalink
Add day40
Browse files Browse the repository at this point in the history
  • Loading branch information
MadhavBahl committed Feb 13, 2019
1 parent ff40293 commit 377920f
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -67,6 +67,7 @@ Motivate yourself to code daily till 60 days, and see the magic! Coding will bec
| [Day 37](./day37) | [Radix Sort](./day37) | [http://codetoexpress.tech/dc/day37/](http://codetoexpress.tech/dc/day37/) | **Misc** |
| [Day 38](./day38) | [Implement Stack Data Structure](./day38) | [http://codetoexpress.tech/dc/day38/](http://codetoexpress.tech/dc/day38/) | **Beginner** |
| [Day 39](./day39) | [Maximum Element and Reverse Stack](./day39) | [http://codetoexpress.tech/dc/day39/](http://codetoexpress.tech/dc/day39/) | **Intermediate** |
| [Day 40](./day40) | [Prefix, Infix, Postfix Conversion](./day40) | [http://codetoexpress.tech/dc/day40/](http://codetoexpress.tech/dc/day40/) | **Intermediate** |

## [More Problems](./BONUS/README.md)

Expand Down
Binary file removed day39/Daily Codes.png
Binary file not shown.
Binary file added day39/cover.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions day40/JavaScript/inToPost.js
@@ -0,0 +1 @@
// to be added
1 change: 1 addition & 0 deletions day40/JavaScript/inToPre.js
@@ -0,0 +1 @@
// To Be Added
1 change: 1 addition & 0 deletions day40/JavaScript/postToIn.js
@@ -0,0 +1 @@
// To Be added
54 changes: 54 additions & 0 deletions day40/README.md
@@ -0,0 +1,54 @@
![cover](./cover.png)

# Day 40 - Prerfix, Infix, Postfix Conversion

**Infix Expression**: The expression of the form a op b. When an operator is in-between every pair of operands.
**Example**: ( (A * B) + (C / D) )

**Prefix Operation**: An expression is called the prefix expression if the operator appears in the expression before the operands. Simply of the form (operator operand1 operand2)
**Example**: (+ (* A B) (/ C D) )

**Postfix Expression**: The expression of the form a b op. When an operator is followed for every pair of operands.
**Example**: ( (A B *) (C D /) +)

## Question 1

Convert an Infix Expression to a Postfix Expression

**Hint**: https://www.geeksforgeeks.org/stack-set-2-infix-to-postfix/

## Question 2

Convert an Infix Expression to a Prefix Expression

**Hint**: https://www.geeksforgeeks.org/infix-to-prefix-conversion-using-two-stacks/

## Question 3

Convert an Postfix Expression to a Infix Expression

**HINT**: https://www.geeksforgeeks.org/postfix-to-infix/

## Solution to Question 1

### [JavaScript Implementation](./JavaScript/inToPost.js)

```js
// To Be Added
```

## Solution to Question 2

### [JavaScript Implementation](./JavaScript/inToPre.js)

```js
// To Be Added
```

## Solution to Question 3

### [JavaScript Implementation](./JavaScript/postToIn.js)

```js
// To Be Added
```
Binary file added day40/cover.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 377920f

Please sign in to comment.