2
2
### This repository contains various coding challenges taken on Sites like HackerRank, LeetCode etc.
3
3
4
4
## Challenge #1 - Prefix Notation
5
- #### Write a function that evaluates an expression written in Prefix Notiation and returrns a value
5
+ ### Write a function that evaluates an expression written in Prefix Notiation and returrns a value
6
6
7
- ##### Problem Statement:
7
+ #### Problem Statement:
8
8
9
9
Prefix notation (also known as polish notation) is an alternative to the more familier infix notation.
10
10
@@ -49,7 +49,7 @@ expression: + 10 x
49
49
variables {"x":3}
50
50
value: 13
51
51
```
52
- ##### Task
52
+ #### Task
53
53
54
54
Implement a function CalculateExpression(expression,variables)
55
55
that takes as inputs:
@@ -66,7 +66,7 @@ The only accepted numeric operands aer positive integers in base 10 (e.g 1,22, 8
66
66
67
67
A valid variable name is any sequence of characters that doesn't include whitespaces(spaces,tabs, newlines, etc).
68
68
69
- ##### Examples
69
+ #### Examples
70
70
71
71
```
72
72
Expression: + 1 5
@@ -125,7 +125,7 @@ variables: {"x":1,"y":3}
125
125
result: 9
126
126
```
127
127
128
- ##### Solution: CodingChallenge.HackerRank/PrefixNotation.cs
129
- ##### Test Cases : CodingChallenge.Tests/UT_PrefixNotation.cs
130
-
128
+ #### Solution: CodingChallenge.HackerRank/PrefixNotation.cs
129
+ #### Test Cases : CodingChallenge.Tests/UT_PrefixNotation.cs
130
+ ![ alt text ] https://github.com/csehammad/CodingProblems/blob/main/CodingChallenge.Tests/IMG_PrefixNotation.png?raw=true )
131
131
0 commit comments