i
Iris Software
Filter interviews by
Top trending discussions
posted on 6 Nov 2018
The question asks to count the number of occurrences of each character in a given string, ignoring case and wild card characters.
Convert the string to lowercase to ignore case.
Remove any wild card characters from the string.
Create an array of size 26 to store the count of each character.
Iterate through each character in the string and increment the count in the array accordingly.
Return the array of counts as the result
HashMap is used for efficient key-value pair storage and retrieval.
HashMap provides constant time complexity for basic operations like get and put.
It allows storing unique keys and their corresponding values.
HashMap is suitable for scenarios where fast lookup is required.
Other collections like ArrayList or LinkedList have different use cases and performance characteristics.
based on 1 interview
Interview experience
Technical Lead
573
salaries
| ₹15 L/yr - ₹36.2 L/yr |
Senior Software Engineer
573
salaries
| ₹10 L/yr - ₹32 L/yr |
Senior Engineer
400
salaries
| ₹9.5 L/yr - ₹31 L/yr |
Senior Technical Consultant
367
salaries
| ₹9.5 L/yr - ₹29.5 L/yr |
Senior Technology Engineer
330
salaries
| ₹13 L/yr - ₹33 L/yr |
TCS
Infosys
Wipro
HCLTech