SarthiQ

SarthiQ

Interview Preparation Guide

Infosys
Questions & Answers

A comprehensive, expert-curated list of real interview questions to help you prepare effectively and land your dream job.

Document Details

Topic / Subject
Infosys
Content Length
49 Curated Q&A
Generated On
October 4, 2026
Provided By
SarthiQ.com
Want to explore more questions & mock interviews? Click on 👉www.sarthiq.com
© 2026 SarthiQ Platform. All rights reserved.
www.sarthiq.com
Resume Upload Get Job in 90 Days Resume Builder AI Interview Coach Interview Questions Placement Committee Self Assessment Get Internship

Need Help?

[email protected]

Top Infosys Interview Questions

NETFLIX
ORACLE
Adobe
NVIDIA
meta
IBM
wipro
TCS
cisco
intel
SAP
Uber

Infosys Interview Questions

Practice with real Infosys interview questions

01
A Frontend Developer was asked
SarthiQ Infosys
Medium
Asked in 2024
Q. How can you effectively manage state in a React application? Discuss the pros and cons of using Context API versus Redux for state management.
Ans. In a React application, state management is crucial for maintaining the app's data flow. Two popular methods are Context API and Redux. Context API The Context API allows us to share state across the component tree without passing props down manually at every level. Here’s a basic example:
javascript
import React, { createContext, useContext, useState } from 'react';

const MyContext = createContext();

const MyProvider = ({ children }) => {
    const [state, setState] = useState({ user: null });

    return (
        <MyContext.Provider value={{ state, setState }}>
            {children}
        </MyContext.Provider>
    );
};

const ChildComponent = () => {
    const { state, setState } = useContext(MyContext);
    return <div>User: {state.user}</div>;
};

const App = () => (
    <MyProvider>
        <ChildComponent />
    </MyProvider>
);
Pros: - Simplicity and ease of use. - No additional libraries required. Cons: - Not suitable for complex state management and can lead to performance issues with frequent re-renders. Redux Redux is a more powerful state management library that uses a centralized store. Here’s a basic example:
javascript
import React from 'react';
import { createStore } from 'redux';
import { Provider, useDispatch, useSelector } from 'react-redux';

const initialState = { user: null };

const reducer = (state = initialState, action) => {
    switch (action.type) {
**        case 'SET_USER':**
            return { ...state, user: action.payload };
**        default:**
            return state;
    }
};

const store = createStore(reducer);

const ChildComponent = () => {
    const user = useSelector(state => state.user);
    const dispatch = useDispatch();

    const setUser = (user) => {
        dispatch({ type: 'SET_USER', payload: user });
    };

    return <div>User: {user}</div>;
};

const App = () => (
    <Provider store={store}>
        <ChildComponent />
    </Provider>
);
Pros: - Predictable state management and easier debugging with tools like Redux DevTools. - More maintainable for larger applications. Cons: - More boilerplate code required. - Learning curve can be steep for beginners. In summary, for small applications, Context API may suffice, but for larger applications where performance and maintainability are a concern, Redux is often the better choice.
Frontend DeveloperCore Concept
02
A Backend Developer was asked
SarthiQ Infosys
Hard
Asked in 2025
Q. What strategies would you use to ensure container orchestration with Kubernetes is reliable and fault-tolerant?
Ans. To ensure reliability and fault tolerance in a Kubernetes environment, several strategies must be implemented: 1. Pod Disruption Budgets (PDB): Define PDBs to limit the number of concurrent disruptions to your pods. This ensures that a certain number always remain available during upgrades or maintenance:
yaml
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
**metadata:**
  name: my-app-pdb
**spec:**
  minAvailable: 2
**  selector:**
**    matchLabels:**
      app: my-app
2. Horizontal Pod Autoscaler (HPA): Use HPA to automatically scale your pods based on CPU/memory usage or custom metrics. This maintains performance during traffic spikes:
yaml
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
**metadata:**
  name: my-app-hpa
**spec:**
**  scaleTargetRef:**
    apiVersion: apps/v1
    kind: Deployment
    name: my-app
  minReplicas: 2
  maxReplicas: 10
**  metrics:**
    - type: Resource
**      resource:**
        name: cpu
**        target:**
          type: Utilization
          averageUtilization: 80
3. Health Checks: Implement readiness and liveness probes to ensure that pods are running healthy and can handle traffic.
yaml
**livenessProbe:**
  httpGet:
    path: /health
    port: 8080
  initialDelaySeconds: 30
  periodSeconds: 10
4. Use of StatefulSets: For applications that need stable storage and unique network identities, use StatefulSets for better management of stateful applications. 5. Backup and Disaster Recovery: Regularly back up your etcd data and have a disaster recovery plan in place to restore your cluster quickly. By following these strategies, you can ensure your Kubernetes deployment is robust, scalable, and fault-tolerant, which is essential in today's microservices-driven architectures.
Backend DeveloperCore Concept
03
Frontend Developer
SarthiQ Infosys
Hard

Question:

How would you design a scalable system for XYZ...

04
Software Engineer
SarthiQ Infosys
Hard

Question:

How would you design a scalable system for XYZ...