Yodlee
10+ Neo Rays Software Solutions Interview Questions and Answers
Q1. Palindrome Linked List Problem Statement
Determine if a given singly linked list of integers is a palindrome. Return true
if it is a palindrome, otherwise return false
.
Example:
Input:
1 -> 2 -> 3 -> 2 -> 1 -> ...read more
Check if a given singly linked list of integers is a palindrome.
Use two pointers to find the middle of the linked list.
Reverse the second half of the linked list.
Compare the first half with the reversed second half to determine if it is a palindrome.
Q2. Valid Parentheses Problem Statement
Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.
Input:
The first line contains an integer...read more
The task is to determine if a given string of parentheses is balanced or not.
Iterate through the characters of the string and use a stack to keep track of opening parentheses.
When encountering an opening parenthesis, push it onto the stack. When encountering a closing parenthesis, check if it matches the top of the stack.
If the stack is empty at the end or there are unmatched parentheses, the string is not balanced.
Example: For input '{}[]()', the stack will contain '{', '[',...read more
String Buffer is synchronized and thread-safe, while String Builder is not synchronized and faster.
String Buffer is synchronized, making it thread-safe for use in multi-threaded environments.
String Builder is not synchronized, resulting in faster performance but not thread-safe.
String Builder is preferred for single-threaded operations, while String Buffer is preferred for multi-threaded operations.
Level order traversal of a binary tree in spiral form involves alternating between left and right while traversing each level.
Start by pushing the root node into a queue.
While the queue is not empty, pop a node, print its value, and push its children into the queue.
For each level, alternate between popping nodes from the queue and printing their values from left to right or right to left.
Continue this process until all nodes have been traversed.
Paging and segmentation are memory management techniques in operating systems.
Paging divides physical memory into fixed-size blocks called pages, while segmentation divides logical memory into variable-size segments.
Paging allows for efficient memory allocation and management, while segmentation provides protection and sharing of memory.
Paging is simpler to implement but can lead to internal fragmentation, while segmentation is more complex but can prevent fragmentation.
Examp...read more
ACID properties are a set of properties that guarantee the reliability of transactions in database management systems.
ACID stands for Atomicity, Consistency, Isolation, and Durability.
Atomicity ensures that either all operations in a transaction are completed successfully or none of them are.
Consistency ensures that the database remains in a consistent state before and after the transaction.
Isolation ensures that the execution of multiple transactions concurrently does not in...read more
Mutex is used for exclusive access to a resource, while semaphore is used for controlling access to a resource by multiple threads.
Mutex is binary and allows only one thread to access the resource at a time.
Semaphore can have a count greater than one, allowing multiple threads to access the resource simultaneously.
Mutex is typically used for protecting critical sections of code, while semaphore is used for synchronization between multiple threads.
Example: Mutex can be used to...read more
Q8. to write code to check linked list is palindrome or not, in a single traversal and without using any other data structure
Code to check if linked list is palindrome without using any other data structure and in a single traversal.
Traverse the linked list using two pointers, one slow and one fast
Reverse the first half of the linked list while traversing
Compare the reversed first half with the second half of the linked list
Q9. write a program for snake traversal of binary tree
Program for snake traversal of binary tree
Use a stack to keep track of nodes to be visited
Start with the root node and push it onto the stack
While the stack is not empty, pop a node and print its value
If the level is even, push the left child first and then the right child onto the stack
If the level is odd, push the right child first and then the left child onto the stack
Smart pointers in C++ are objects that act like pointers but provide automatic memory management.
Smart pointers help prevent memory leaks by automatically managing memory allocation and deallocation.
Examples include unique_ptr, shared_ptr, and weak_ptr.
unique_ptr is used for exclusive ownership, shared_ptr for shared ownership, and weak_ptr to prevent circular references.
Abstract classes in C++ are classes that cannot be instantiated and are designed to be base classes for other classes.
Abstract classes may contain pure virtual functions, making them incomplete and unable to be instantiated.
Derived classes must implement all pure virtual functions from the abstract class in order to be concrete classes.
Abstract classes can have non-virtual functions and member variables like regular classes.
Example: class Shape { virtual void draw() = 0; };
Ex...read more
A virtual function is a function in a base class that is declared using the keyword 'virtual' and can be overridden by a function with the same signature in a derived class.
Virtual functions allow for dynamic polymorphism in object-oriented programming.
They are used to achieve runtime polymorphism by enabling late binding.
Virtual functions are declared in a base class and can be overridden in derived classes.
Example: virtual void display() = 0; // pure virtual function
Example...read more
Concurrency control is a technique used in databases to manage simultaneous access and modification of data by multiple users or processes.
Concurrency control ensures that transactions are executed in a way that maintains data consistency and integrity.
Techniques like locking, timestamp ordering, and optimistic concurrency control are used to implement concurrency control.
For example, in a banking system, concurrency control ensures that two users cannot withdraw money from t...read more
More about working at Yodlee
Interview Process at Neo Rays Software Solutions
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month