Monday, November 30, 2020

Match 5 - Jaffna stallions vs Dambulla vikings | LPL 2020


Lanka Premier League live,LPL live,lpl t20 live,Lanka t20 live,live cricket,sri lanka t20 live,sri lanka premier league,Lanka live,t20 live match,t20 live,live cricket match today,live match,sri lanka premier league t20 live,cricket live,sri lanka t20 league,t20 cricket live,t20 live cricket,sri lanka premier league t20,sri lanka t20,lpl sri lanka 2020 live,lpl sri lanka live,Lanka T20 Live Cricket Match,Lanka T20 Watch Online,Lanka T20 Live Match Lanka T20 Live || Lanka Premier League 2020 Live Match || Sri Lanka T20 Live || DV vs JS Live Lanka Premier League 2020 Live || DV vs JS Live || LPL Live || Dambulla Viiking vs Jaffna Stallions Live Lanka Premier League 2020 Live || DV vs JS Live || LPL Live || Dambulla Viiking vs Jaffna Stallions Live Lanka Premier League 2020 Live || DV vs JS Live || LPL Live || Dambulla Viiking vs Jaffna Stallions Live Lanka Premier League 2020 Live || DV vs JS Live || LPL Live || Dambulla Viiking vs Jaffna Stallions Live #LPLlive #JSvsDVlive #LankaT20Live t20,sri lanka,sri lanka t20,lanka premier league 2020 live streaming,lanka premier league 2020 live,lanka premier league 2020 live match,india vs sri lanka live,lanka premier league 2020 live in india,lanka premier league 2020 live streaming in india,live,ind sri lanka live,lanka,sri lanka t20 league live,india vs sri lanka 2019 live,sri lanka 2019,live match,lanka premier league 2020 live channel,lanka premier league 2020 live telecast,live ind vs sri t20,india vs sri lanka 2nd t20 live lanka premier league 2020,lanka premier league,lanka premier league 2020 live in india,sri lanka premier league 2020,sri lanka premier league 2020 live streaming,lanka premier league 2020 live match,lanka premier league 2020 live streaming,sri lanka premier league,lanka premier league 2020 live,lanka premier league 2020 live streaming in india,lanka premier league 2020 teams,srilanka premier league 2020,lanka t20 live,lanka t20 live streaming,DV vs JS Live Lanka T20 Live Streaming, Lanka T20 Live Streaming, Lanka T20 Live Cricket Match, Lanka T20 Watch Online, Lanka T20 Match Live Streaming, Lanka T20 Live Match, Lanka T20 Watch Online, Lanka T20 Match Live Streaming, Lanka T20 2020 Live Match, Lanka T20 2020 Watch Online, Lanka T20 2020 Match Live Streaming, Sri Lanka T20 Live Streaming, Lanka T20 Live Streaming, Sri Lanka T20 Live Cricket Match, Sri Lanka T20 Watch Online, Sri Lanka T20 Match Live Streaming, Sri Lanka T20 Live Match, Sri Lanka T20 Watch Online, Sri Lanka T20 Match Live Streaming, Sri Lanka T20 2020 Live Match, Sri Lanka T20 2020 Watch Online, Sri Lanka T20 2020 Match Live Streaming, Lanka Premier League Live Streaming, Watch Lanka Premier League Live Streaming, Lanka Premier League Live Cricket Match, Lanka Premier League Watch Online, Lanka Premier League Match Live Streaming, Lanka Premier League Live Match, Lanka Premier League Watch Online, Lanka Premier League Match Live Streaming, Lanka Premier League 2020 Live Match, Lanka Premier League 2020 Watch Online, Lanka Premier League 2020 Match Live Streaming, Watch Lanka Premier League 2020 Live Streaming, Live Cricket Streaming, Watch Live Cricket, Live Cricket Match Today, LPL Live Streaming, LPL Live Streaming, LPL Live Cricket Match, LPL Watch Online, LPL Match Live Streaming, LPL Live Match, LPL Watch Online, LPL Match Live Streaming, LPL 2020 Live Match, LPL 2020 Watch Online, LPL 2020 Match Live Streaming, Lanka Premier League live,LPL live,lpl t20 live,Lanka t20 live,live cricket,sri lanka t20 live,sri lanka premier league,Lanka live,t20 live match,t20 live,live cricket match today,live match,sri lanka premier league t20 live,cricket live,sri lanka t20 league,t20 cricket live,t20 live cricket,sri lanka premier league t20,sri lanka t20,lpl sri lanka 2020 live,lpl sri lanka live,

Thursday, November 19, 2020

Evaluate postfix expression 3 2 ↑ 5 4 3 ↑ * + 18 9 / - using stack.


Evaluate the postfix expression 3 2 5 4 3 * + 18 9 / -    using stack.

Write each step of this evaluation using the following table. 

Input

Op1

Op2

Value

Stack

 

 

 

 

 

 








Input

Op1

Op2

Value

Stack

3

 

 

 

3

 

 

 

2

 

 

 

3

2

 

 

3

2

9

9

 

 

 

5

3

2

9

9

5

 

 

4

3

2

9

9

5

4

 

3

3

2

9

9

5

4

3

4

3

64

9

5

64

 

*

5

64

320

9

320

 

 

+

9

320

329

329

 

 

 

18

9

320

329

329

18

 

 

9

9

320

329

329

18

9

 

/

18

9

2

329

2

 

 

-

329

2

327

327

 

 

 

Postfix Expression Evaluation Result is:  327

Rules/Algorithm

Ø Each operator in a postfix expression refers to the previous two operands.

Ø Each time we read an operand, we push it on a stack.

Ø When we reach an operator, we pop the two operands from the top of the stack, apply the operator and push the result back on the stack.

Evaluating Postfix Algorithm:

Stack s;
while( not end of input ) {
e = get next element of input
if( e is an operand )
s.push( e );
else {
op2 = s.pop();
op1 = s.pop();
value = result of applying operator ‘e’ to op1 and op2;
s.push( value );
}
}

finalresult = s.pop();

                       Thank you