Infosys interview question

Technical Questions Asked: -- TypeScript -Difference between union types and generic types. -How would you model an API response that can return either data or an error? -Interface vs Type in TypeScript and when to use each. -Preferred approach for type narrowing (discriminated unions vs property existence checks). -- Frontend / React -Local state vs global state management. -How to architect state management for a scalable enterprise React application. -Redux Toolkit, React.memo, useMemo, and state organization. -Deciding what belongs in the global store versus component state. --Performance -Core Web Vitals (LCP, INP, CLS). -Improving Largest Contentful Paint (LCP). -Cross-browser compatibility strategies. -Autoprefixer, polyfills, feature detection, and progressive enhancement. -Debugging browser-specific issues (especially Safari). -Debugging production-only JavaScript errors. --Architecture & Design -SOLID principles with practical examples. -Applying Liskov Substitution Principle and Interface Segregation Principle. -Designing maintainable microservices. -Improving architecture for tightly coupled applications. -Communication between microservices. -REST APIs vs asynchronous messaging. -API versioning and data consistency. --Java / Backend -Performance troubleshooting for enterprise Java applications. -Application-level metrics to monitor during performance analysis. -Database optimization, caching, and connection pooling. --Agile -Estimation techniques when requirements are ambiguous. -Story Points and Planning Poker. -Managing uncertainty and communicating risks to stakeholders. --Quality Assurance -Unit testing vs manual exploratory testing. -Importance of exploratory testing during release cycles. --Coding Round The coding exercise was based on Graphs. The problem required finding the number of Strongly Connected Components (SCC) in a directed graph. It involved implementing a graph traversal algorithm and handling directed edges correctly. If you're preparing for this interview, it's worth practicing: DFS Graph traversal Strongly Connected Components (Kosaraju's or Tarjan's Algorithm)