DE Shaw
Kryfs Transformers Interview Questions and Answers
Q1. Compiler Stages to execute the c program, symbol table
Compiler stages include preprocessing, compilation, assembly, and linking. Symbol table stores information about identifiers.
Preprocessing stage handles directives like #include and #define
Compilation stage translates source code to assembly language
Assembly stage converts assembly code to machine code
Linking stage combines object files and libraries into an executable
Symbol table stores information about identifiers like variable names and function names
Q2. Deadlock avoidance algorithm(Banker's algorithm)
Banker's algorithm is a deadlock avoidance algorithm used in operating systems.
It is used to avoid deadlock in a multi-process system.
It works by checking if a request for resources will leave the system in a safe state.
It uses a matrix to represent the current state of the system and the maximum resources each process can request.
If the request can be granted without leaving the system in an unsafe state, it is granted.
If not, the process must wait until the resources become...read more
Q3. Intersection on two list in java
Intersection of two lists in Java
Convert lists to sets and use retainAll() method
Iterate through one list and check if element is present in other list
Use Java 8 streams and filter() method
Q4. Allocation of memory on Heap and stack
Heap and stack are two memory allocation areas in a program.
Heap is used for dynamic memory allocation and is managed by the programmer.
Stack is used for static memory allocation and is managed by the system.
Heap memory is allocated using 'new' keyword in C++ and 'malloc' function in C.
Stack memory is allocated automatically for local variables and function calls.
Heap memory is not automatically deallocated and can cause memory leaks if not managed properly.
Stack memory is au...read more
Q5. Difference between Calloc and malloc
Calloc initializes memory with zero while malloc does not.
Calloc allocates memory and initializes it with zero
Malloc allocates memory but does not initialize it
Calloc is useful for allocating memory for arrays
Malloc is useful for allocating memory for single variables
Q6. Page Replacement Algorithm
Page Replacement Algorithm is used to decide which page to remove from memory when new page is to be loaded.
It is used in operating systems to manage memory.
It is based on the principle of locality of reference.
Examples include FIFO, LRU, Optimal, etc.
Q7. Inorder traversal of tree
Inorder traversal is a way of visiting each node in a binary tree in a specific order.
Start at the leftmost node and traverse the left subtree recursively.
Visit the current node.
Traverse the right subtree recursively.
Repeat until all nodes have been visited.
Inorder traversal is commonly used to print the nodes of a binary search tree in sorted order.
More about working at DE Shaw
Reviews
Interviews
Salaries
Users/Month