In a software development scenario, if a developer needs to optimize database queries for an Infosys client project, which of the following is NOT a standard optimization technique?
ACreating indexes on frequently queried columns
BUsing wildcard characters at the beginning of search terms
CDenormalizing tables strategically
DImplementing query caching
Correct Answer:
B. Using wildcard characters at the beginning of search terms
Explanation:
Using wildcard characters at the beginning (like '%search') prevents index usage and is a poor optimization practice. Standard techniques include indexing, denormalization, and caching.
A candidate appears for Infosys recruitment. In the coding round, they need to find the longest substring without repeating characters. What data structure would be most efficient?
AStack
BHash Map/Dictionary
CQueue
DLinked List
Correct Answer:
B. Hash Map/Dictionary
Explanation:
A Hash Map is ideal for tracking character indices and detecting repeating characters with O(n) time complexity.
In an Infosys placement interview, if asked about handling a critical production issue with multiple stakeholders involved, what would be the BEST approach?
AMake changes without informing anyone
BCommunicate clearly, escalate properly, and document the resolution
CWait for permission from all stakeholders before acting
DBlame the previous developer
Correct Answer:
B. Communicate clearly, escalate properly, and document the resolution
Explanation:
Professional incident handling requires clear communication, proper escalation, and detailed documentation to ensure transparency and prevent recurrence.