Adobe
Vindhya Institute of Technology and Science Interview Questions and Answers
Q1. Copy fixed no of bytes from source to destination and its test cases( ex: copy(source, destination,bytes) so now command copy(a,a+3,8) will not give correct results in some cases and copy(a,a-4,8) will not give...
read moreCopying fixed number of bytes from source to destination and its test cases.
Ensure source and destination are not overlapping
Check if the number of bytes to be copied is greater than the available space in the destination
Handle cases where source or destination is NULL
Test cases should cover all possible scenarios including edge cases
Q2. Merge two double linked list. What will be the difference if they are singly linked list
To merge two double linked lists, traverse to the end of the first list and connect it to the head of the second list.
Traverse to the end of the first list
Connect the last node of the first list to the head of the second list
If the lists are singly linked, we need to traverse to the end of the first list and connect it to the head of the second list. But we also need to keep track of the last node of the first list to connect it to the head of the second list.
Example: list1: ...read more
Q3. Make a data structure such that it can store an image dynamically
A dynamic data structure for storing images as arrays of strings.
Use a 2D array of strings to represent the image pixels.
Implement resizing methods to adjust the size of the image.
Include methods for adding, removing, and modifying pixels.
Consider using compression techniques to reduce memory usage.
Support various image formats such as JPEG, PNG, and BMP.
Q4. Solution for solving problems generated by virtual functions
Virtual functions can cause problems due to their dynamic nature, but can be solved using various techniques.
Use pure virtual functions to ensure all derived classes implement the function
Use interface classes to define a common interface for all derived classes
Use smart pointers to manage memory and avoid memory leaks
Use virtual destructors to ensure proper destruction of objects
Avoid excessive use of virtual functions to improve performance
Q5. Optimized fibonacci program
An optimized Fibonacci program computes Fibonacci numbers efficiently.
Use memoization to store previously computed values.
Use iterative approach instead of recursive approach.
Use bitwise operators to perform arithmetic operations faster.
Use matrix exponentiation to compute Fibonacci numbers in logarithmic time.
Q6. TELL ABOUT TREE TRAVERSALS
Tree traversals are methods used to visit each node in a tree data structure in a specific order.
Inorder traversal: Visit left subtree, then root, then right subtree
Preorder traversal: Visit root, then left subtree, then right subtree
Postorder traversal: Visit left subtree, then right subtree, then root
More about working at Adobe
Top SDE Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month