ThoughtSpot
PepsiCo Interview Questions and Answers
Q1. Design a library for api testing
A library for API testing that provides a set of functions and utilities to simplify the testing process.
The library should have functions to send HTTP requests and validate responses.
It should support different authentication methods like OAuth, JWT, etc.
The library should handle common API testing scenarios like testing CRUD operations, handling different HTTP methods, etc.
It should provide utilities for data-driven testing, allowing testers to easily parameterize and itera...read more
Q2. Implement a persistence stack with constant time operations
Implement a persistence stack with constant time operations
Use a combination of a stack and a hashmap to achieve constant time operations for push, pop, and get operations
Maintain a stack to store the elements and a hashmap to store the index of each element in the stack
When pushing an element, add it to the stack and update its index in the hashmap
When popping an element, remove it from the stack and also remove its index from the hashmap
For get operation, retrieve the eleme...read more
Q3. Median of two sorted arrays and OOPs basics
Finding the median of two sorted arrays and discussing OOPs basics
To find the median of two sorted arrays, merge the arrays and then calculate the median
OOPs basics include concepts like encapsulation, inheritance, polymorphism, and abstraction
Example: Median of [1, 3] and [2] is 2.0
Q4. Types of load balancing
Load balancing is a technique used to distribute network traffic across multiple servers to ensure optimal performance and availability.
Types of load balancing include: round robin, least connections, IP hash, and weighted round robin.
Round robin distributes traffic evenly across servers in a sequential manner.
Least connections directs traffic to the server with the fewest active connections.
IP hash uses the client's IP address to determine which server to send traffic to.
Wei...read more
Q5. Promises in Javascript
Promises in JavaScript are objects representing the eventual completion or failure of an asynchronous operation.
Promises help in handling asynchronous operations in a more organized manner.
They can be in three states: pending, fulfilled, or rejected.
Promises can be chained using .then() method to handle success and failure cases.
They can also be used with async/await for more readable asynchronous code.
Q6. Design Whatsapp
Design a messaging app like Whatsapp
Implement end-to-end encryption for secure messaging
Allow users to send text messages, images, videos, and documents
Include features like group chats, voice and video calls, status updates
Provide option for users to share their location
Develop a user-friendly interface with customizable settings
Interview Process at PepsiCo
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month