Evaluate the following prefix expression " ++ 26 + - 1324"
Answer Posted / rushi
I see multiple answers to this depending on how you interpret 1324 into 3 numbers i.e. either 1 3 24, 13 2 4, 1 32 4, etc.
1. ++ 26 + - 1324
+(+26) + - 1324 -> +26 becomes 8
+8+(-13 2)4 -> 13 -2 = 11
+8(+11 4) -> 11 +4 = 15
+8 15
= 23
2.++ 26 + - 1324
+(+26) + - 1324 -> +26 becomes 8
+8+(-1 3)24 -> 1 -3 = '-'2
+8(+(-2) 24) -> 24 + -2 = 24 -2 = 22
+8 22
= 30
3.++ 26 + - 1324
+(+26) + - 1324 -> +26 becomes 8
+8+(-1 32)4 -> 1 -32 = '-'31
+8(+(-31) 24) -> -31 + 24 = -7
+8 '-7'
= 1
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
Given an unsorted linked list, and without using a temporary buffer, write a method that will delete any duplicates from the linked list?
Explain what are the types of collision resolution techniques and the methods used in each of the type?
Differentiate linear from a nonlinear data structure?
What is a list in data structure?
Why do we use arrays?
How many types of linked list are there?
What is collections singletonlist?
What are the advantages of binary search over linear search?
How do you determine if a binary tree is height balanced?
Does arraylist shrink?
Give a real time example of stack
What do you mean by linear probing?
What does bubble sort do?
Mention the steps to insert data at the starting of a singly linked list?
Define a set?