Pattern: 32 MCQS + 2 DSA
Jasmine has a unique strategy for buying shares.
Every day, she randomly selects N companies and checks their current share prices.
She is interested in buying the shares of a company only if the value remains unchanged after reversing its digits.
If the share price is negative, it is written with a leading '-' sign. The minus sign is not considered part of the digits while reversing.
For each company, determine whether Jasmine will buy its shares.
Print:
"YES" if the reversed number is equal to the original number."NO" otherwise.Print N lines.
For each share price print:
"YES" if it remains unchanged after reversing its digits."NO" otherwise.2
313
-11
YES
NO
313 reversed is 313, so print YES.-11 represents a loss. Reversing the digits gives 11, which is not equal to -11, so print NO.2
12
22
NO
YES
12 reversed becomes 21, so print NO.22 reversed remains 22, so print YES.Jefeeerirs • Pending
Jefeeerirs • Pending
Jefeeerirs • Pending
Texas • Pending