Ernst & Young
10+ Godfrey Phillips India Interview Questions and Answers
Q1. Intersection of Linked List Problem Statement
You are provided with two singly linked lists of integers. These lists merge at a node of a third linked list.
Your task is to determine the data of the node where ...read more
Q2. Pythagorean Triplets Detection
Determine if an array contains a Pythagorean triplet by checking whether there are three integers x, y, and z such that x2 + y2 = z2 within the array.
Input:
The first line contai...read more
Q3. Swap Two Numbers Problem Statement
Given two integers a
and b
, your task is to swap these numbers and output the swapped values.
Input:
The first line contains a single integer 't', representing the number of t...read more
Q5. What is the difference between arrays and linked list. Which one is better
Arrays are fixed in size and have contiguous memory, while linked lists are dynamic and have non-contiguous memory.
Arrays have constant time access to elements, while linked lists have linear time access.
Arrays are better for random access and searching, while linked lists are better for insertion and deletion.
Arrays use less memory for storing elements, while linked lists use more memory due to additional pointers.
Example: Array - ['apple', 'banana', 'cherry'], Linked List -...read more
Q15. What are OOPs Concepts?
OOPs Concepts are fundamental principles of Object-Oriented Programming that help in organizing and designing code.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object).
Inheritance: Allowing a class to inherit properties and behavior from another class.
Polymorphism: Ability of objects to take on multiple forms or have multiple behaviors.
Abstraction: Hiding the complex implementation details and showing only the necessary features of an ...read more
Q16. What is AVL tree?
AVL tree is a self-balancing binary search tree where the heights of the two child subtrees of any node differ by at most one.
AVL tree was named after its inventors Adelson-Velsky and Landis.
It is a type of binary search tree where the heights of the two child subtrees of any node differ by at most one.
AVL trees are used to maintain a balanced tree structure, ensuring O(log n) time complexity for insertion, deletion, and search operations.
Rotations are performed on AVL trees ...read more
Q17. Share your college experienceon coding.
I gained hands-on coding experience through coursework, projects, and internships during my college years.
Took courses in programming languages such as Java, C++, and Python.
Participated in coding competitions and hackathons to enhance my skills.
Completed coding projects in areas like web development, data analysis, and software engineering.
Interned at a tech company where I worked on real-world coding projects.
Collaborated with classmates on coding assignments and group proj...read more
Q18. Define LIFO, FIFO etc
LIFO stands for Last In, First Out and FIFO stands for First In, First Out.
LIFO: Last In, First Out - the last item added to a stack is the first one to be removed.
FIFO: First In, First Out - the first item added to a queue is the first one to be removed.
More about working at Ernst & Young
Top HR Questions asked in Godfrey Phillips India
Interview Process at Godfrey Phillips India
Top Associate Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month