Question

why switching on strings more expensive than switching basic data types?(Be specific)

why switching on strings more expensive than switching basic data types?(Be specific)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

Switching on the string are more expensive because:

->Sting may be a NULL

->It do case-sensitive comparition

->Algorythm for comparing string is more time consuming than other primitive data type

->For comaparing Stirng, first convert each charactor into appropriate int than comapre this integer that means so much complexity in string comparition.

Add a comment
Know the answer?
Add Answer to:
why switching on strings more expensive than switching basic data types?(Be specific)
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT