Skip to content

Commit 377920f

Browse files
committed
Add day40
1 parent ff40293 commit 377920f

File tree

8 files changed

+58
-0
lines changed

8 files changed

+58
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Motivate yourself to code daily till 60 days, and see the magic! Coding will bec
6767
| [Day 37](./day37) | [Radix Sort](./day37) | [http://codetoexpress.tech/dc/day37/](http://codetoexpress.tech/dc/day37/) | **Misc** |
6868
| [Day 38](./day38) | [Implement Stack Data Structure](./day38) | [http://codetoexpress.tech/dc/day38/](http://codetoexpress.tech/dc/day38/) | **Beginner** |
6969
| [Day 39](./day39) | [Maximum Element and Reverse Stack](./day39) | [http://codetoexpress.tech/dc/day39/](http://codetoexpress.tech/dc/day39/) | **Intermediate** |
70+
| [Day 40](./day40) | [Prefix, Infix, Postfix Conversion](./day40) | [http://codetoexpress.tech/dc/day40/](http://codetoexpress.tech/dc/day40/) | **Intermediate** |
7071

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

day39/Daily Codes.png

-143 KB
Binary file not shown.

day39/cover.png

146 KB
Loading

day40/JavaScript/inToPost.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// to be added

day40/JavaScript/inToPre.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// To Be Added

day40/JavaScript/postToIn.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// To Be added

day40/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
![cover](./cover.png)
2+
3+
# Day 40 - Prerfix, Infix, Postfix Conversion
4+
5+
**Infix Expression**: The expression of the form a op b. When an operator is in-between every pair of operands.
6+
**Example**: ( (A * B) + (C / D) )
7+
8+
**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)
9+
**Example**: (+ (* A B) (/ C D) )
10+
11+
**Postfix Expression**: The expression of the form a b op. When an operator is followed for every pair of operands.
12+
**Example**: ( (A B *) (C D /) +)
13+
14+
## Question 1
15+
16+
Convert an Infix Expression to a Postfix Expression
17+
18+
**Hint**: https://www.geeksforgeeks.org/stack-set-2-infix-to-postfix/
19+
20+
## Question 2
21+
22+
Convert an Infix Expression to a Prefix Expression
23+
24+
**Hint**: https://www.geeksforgeeks.org/infix-to-prefix-conversion-using-two-stacks/
25+
26+
## Question 3
27+
28+
Convert an Postfix Expression to a Infix Expression
29+
30+
**HINT**: https://www.geeksforgeeks.org/postfix-to-infix/
31+
32+
## Solution to Question 1
33+
34+
### [JavaScript Implementation](./JavaScript/inToPost.js)
35+
36+
```js
37+
// To Be Added
38+
```
39+
40+
## Solution to Question 2
41+
42+
### [JavaScript Implementation](./JavaScript/inToPre.js)
43+
44+
```js
45+
// To Be Added
46+
```
47+
48+
## Solution to Question 3
49+
50+
### [JavaScript Implementation](./JavaScript/postToIn.js)
51+
52+
```js
53+
// To Be Added
54+
```

day40/cover.png

142 KB
Loading

0 commit comments

Comments
 (0)