Adobe
10+ New Science Degree College Interview Questions and Answers
Q1. given sudoku as id array of size . in a given empty cell find the possible numbers that could be possible. Asked me to write code for it
Given a Sudoku board, find possible numbers for an empty cell.
Iterate through empty cells and check possible numbers using row, column, and box constraints.
Use a set to keep track of possible numbers for each empty cell.
Return the set of possible numbers for the given empty cell.
Q2. In an Array of size 95 contain numbers in range 1 to 100. each number is at max once in the array. find the 5 missing numbers in array between 1-100
Find 5 missing numbers in an array of size 95 containing numbers in range 1 to 100.
Create a boolean array of size 100 and mark the present numbers
Iterate through the boolean array and find the missing numbers
Alternatively, use a HashSet to store the present numbers and find the missing ones
Q3. given 4 unsigned integers find their integer average (eg. (2,2,2,3) => (2+2+2+3)/4 = 2) consider integer division ) without typecasting
Find integer average of 4 unsigned integers without typecasting
Add all the integers and divide by 4
Use bit shifting to divide by 4
Handle overflow by using long long data type
Use unsigned int data type for input
Q4. Write a code to identify wheter given processor is of 32 bit architecture or 64 bit architecture
Code to identify 32 bit or 64 bit architecture of a processor
Check if the operating system is 32 bit or 64 bit
If OS is 32 bit, processor is 32 bit
If OS is 64 bit, check if processor supports 64 bit architecture
Use CPUID instruction to check if processor supports 64 bit architecture
Q5. SEARCH AN ELEMENT IN ROTATED SORTED ARRAY. WRITED A CODE FOR IT
Search an element in a rotated sorted array
Find the pivot point where the array is rotated
Divide the array into two sub-arrays based on pivot point
Perform binary search on the appropriate sub-array
Repeat until element is found or sub-array size is 1
Q6. SEARCH AN ELEMENT IN ROTATED SORTED LINKLIST .
Search for an element in a rotated sorted linked list.
Find the pivot point where the list is rotated.
Divide the list into two sublists based on the pivot point.
Perform binary search on the appropriate sublist.
Handle edge cases such as empty list and list with only one element.
Q7. convert a binary number into base 64 integer
Convert binary number to base 64 integer
Divide the binary number into groups of 6 bits
Convert each group of 6 bits to decimal
Map the decimal value to the corresponding base 64 character
Concatenate the base 64 characters to form the final integer
Q8. WRITE A GENERIC SWAP FUNCTION
A generic swap function swaps two values of any data type.
The function should take two parameters of any data type.
Use a temporary variable to store the value of one parameter.
Assign the value of the second parameter to the first parameter.
Assign the value of the temporary variable to the second parameter.
Q9. is any virtual destructor?
Yes, a virtual destructor is used to ensure proper destruction of derived class objects.
A virtual destructor is declared with the virtual keyword in the base class.
It ensures that the destructor of the derived class is called before the base class destructor.
Without a virtual destructor, memory leaks and undefined behavior can occur.
Example: class Base { virtual ~Base() {} }; class Derived : public Base { ~Derived() {} };
Example: Base* b = new Derived(); delete b; // calls De...read more
Q10. what is constructor?
A constructor is a special method that is used to initialize objects of a class.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
They can take parameters to initialize the object's state.
If a class does not have a constructor, a default one is provided.
Constructors can be overloaded to provide different ways of initializing objects.
Q11. implement vector class.
A vector class can be implemented using an array to store and manipulate a dynamic list of elements.
The class should have methods to add, remove, and access elements.
It should also have methods to resize the array as needed.
The class can be templated to allow for different data types.
Example: vector
myVector; Example: myVector.push_back(5);
Q12. Design chat based solutoin
Design a chat based solution for communication between users.
Implement real-time messaging functionality
Include features like group chats, file sharing, and message encryption
Design a user-friendly interface with customizable settings
Integrate with notification systems for instant updates
Ensure scalability and security of the platform
More about working at Adobe
Interview Process at New Science Degree College
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month