Filter interviews by
I applied via Naukri.com and was interviewed before Oct 2021. There were 2 interview rounds.
OOPs concepts in PHP include inheritance, encapsulation, polymorphism, and abstraction.
Inheritance allows a class to inherit properties and methods from a parent class.
Encapsulation is the practice of keeping properties and methods private to a class.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
Abstraction is the process of hiding implementation details while showing o...
array_merge merges two or more arrays into one, while array_combine creates an array by using one array for keys and another for its values.
array_merge combines the values of two or more arrays into a single array
array_combine creates an array using one array for keys and another for its values
array_merge preserves numeric keys, while array_combine uses the first array as keys and the second as values
array_merge can me...
Top trending discussions
Mechanical Engineering offers a diverse range of opportunities to apply scientific principles to solve real-world problems.
Mechanical Engineering provides a strong foundation in math, physics, and materials science.
It offers a wide range of career opportunities in various industries such as automotive, aerospace, and manufacturing.
Mechanical Engineers design and develop machines, tools, and systems that improve our dai...
I am not currently planning on getting married.
I am currently focused on my career and personal growth.
Marriage is not a priority for me at this time.
I believe in taking the time to find the right person and building a strong foundation before getting married.
I am a software engineer with experience in developing and maintaining software applications.
I have a strong background in programming languages such as Java, C++, and Python.
I have worked on various projects, including developing web applications and implementing software solutions.
I am skilled in problem-solving and debugging, ensuring efficient and effective software development.
I have experience in collaborating wi...
I learned valuable teamwork and problem-solving skills during my summer internship.
Developed strong collaboration skills by working with a team of software engineers to complete projects
Gained experience in troubleshooting and debugging software issues
Learned to effectively communicate and present technical concepts to both technical and non-technical stakeholders
Improved problem-solving abilities by identifying and re...
Find sum of all numbers formed from root to leaf path in a binary tree
Traverse the binary tree using DFS
At each leaf node, add the number formed from root to leaf path to a sum variable
Return the sum variable
Time complexity: O(n)
Example: For a binary tree with root value 1, left child 2 and right child 3, the sum would be 12 + 13 = 25
Given a string, print all possible strings that can be made by placing spaces (zero or one) in between them.
Use recursion to generate all possible combinations of spaces
For each recursive call, either add a space or don't add a space between the current character and the next character
Base case is when there are no more characters left to add spaces between
Time complexity is O(2^n) where n is the length of the string
Preorder traversal without recursion
Use a stack to keep track of nodes
Push right child first and then left child onto stack
Pop top of stack and print value
Repeat until stack is empty
Find longest continuous patch on a 12 km road with updates in patches
Maintain a variable to keep track of current patch length
Update the variable whenever a new patch is added
Maintain a variable to keep track of longest patch so far
Compare current patch length with longest patch length and update if necessary
Use a sorted data structure like a binary search tree to store the patches for efficient search
Time complexity: ...
Find median of an unsorted array.
Sort the array and find the middle element
Use quickselect algorithm to find the median in O(n) time
If the array is small, use brute force to find the median
Find 'k' elements closest to a given number from a stream of characters.
Use a priority queue to keep track of closest elements.
Update the queue as new characters come in.
Return the 'k' closest elements from the queue.
Design a data structure with O(1) insert, remove, find-max, and delete-max operations.
Use a doubly linked list to maintain the elements in sorted order.
Use a hash table to store the pointers to the nodes in the linked list.
Maintain a pointer to the maximum element in the hash table.
Update the pointers in the hash table when inserting or removing elements.
Update the maximum pointer when deleting or inserting the maximum
Check if a given linked list is a palindrome.
Traverse the linked list and store the values in an array.
Compare the first and last elements of the array, then move towards the center.
If all elements match, the linked list is a palindrome.
Alternatively, use two pointers to find the middle of the linked list and reverse the second half.
Compare the first half with the reversed second half to check for a palindrome.
based on 4 reviews
Rating in categories
System Administrator
4
salaries
| ₹2 L/yr - ₹4.5 L/yr |
Reactjs Developer
4
salaries
| ₹4.8 L/yr - ₹11 L/yr |
Software Engineer
3
salaries
| ₹4 L/yr - ₹4.5 L/yr |
Front end Developer
3
salaries
| ₹1 L/yr - ₹1 L/yr |
Magento Developer
3
salaries
| ₹3 L/yr - ₹9.5 L/yr |
TCS
Infosys
Wipro
HCLTech