PhonePe Interview Questions
Practice with real PhonePe interview questions
01
A Software Engineer was asked
Asked in 2024
Q. What are the basic operations on arrays and strings in data structures? Provide examples in a programming language of your choice to demonstrate these operations.
Ans. Arrays and strings are fundamental data structures that store collections of elements. In most programming languages, arrays are fixed in size, while strings are typically treated as arrays of characters.
Basic array operations include:
1. Insertion: Adding an element at a specific index.
2. Deletion: Removing an element from a specific index.
3. Traversal: Accessing each element for processing.
Here’s an example in Python demonstrating these operations:
Basic string operations include:
1. Concatenation: Joining two strings together.
2. Substring extraction: Getting a substring from a string.
3. Length calculation: Finding the number of characters in a string.
Example in Python:
Software EngineerCore Concept
02
A Software Engineer was asked
Asked in 2024
Q. Explain and implement the four pillars of Object-Oriented Programming: Encapsulation, Abstraction, Inheritance, and Polymorphism. Provide code examples for each.
Ans.
Software EngineerCore Concept
