(IITM) Placement Interview Questions Btech CSE
placement questions
Python Questions
- What is python ?
- Python is an Interrupted language. Explain ?
- What is differnce between lists and tuples ?
- What is pep 8 ?
- What are the key feature of python ?
- How is memory managed in python ?
- What is PYTHONPATH ?
- What are python modules ?
- What are python namespaces ?
- Explain inheritence in python with example ?
AI Questions with Python
- What do you understand by AI ?
- Give some real – world application of AI.
- How artificial intelligence, machine learning and deep learning differ from each other ?
- What are the different domains/subsets of AI ?
- Which programming language is used for AI ?
- Which programming language is not generally used in AI and why ?
- What is chatBOT ?
- What are different platforms for AI development ?
SQL Iterview Questions
- What is the difference between “Stored Procedure” and “Function”?
- What is difference between “Clustered Index” and “Non Clustered Index”?
- What is the difference between the “DELETE” and “TRUNCATE” commands?
- What is the difference between the “WHERE” clause and the “HAVING” clause?
- What is the difference between “Primary Key” and “Unique Key”?
- What is the difference between a “Local Temporary Table” and “Global Temporary Table”?
- What are super, primary, candidate and foreign keys?
- What is the difference between primary key and unique constraints?
- What is database normalization?
- What is SQL?
- What are the differences between DDL, DML and DCL in SQL?
- What is the difference between having and where clause?
- What is Join?
- What is Identity?
- What is a view in SQL? How to create one
- What are the uses of view?
- What is a Trigger?
- What is a stored procedure?
- What is the difference between Trigger and Stored Procedure?
- What is a transaction? What are ACID properties?
Data Structure Questions
Tree Data Structure
1) Inorder Traversal of a Binary Tree using Recursion
2) Inorder Traversal of a Binary Tree without Recursion
3) Preorder Traversal of a Binary Tree using Recursion
4) Preorder Traversal of a Binary Tree without Recursion
5) Postorder Traversal of a Binary Tree using Recursion
6) Postorder Traversal of a Binary Tree without Recursion
7) Level Order Traversal of a Binary Tree
8) Reverse Level Order Traversal of a Binary Tree
9) Height of a Binary Tree
10) Mirror of a Tree
11) Invert Binary Tree
12) Cousins in a Binary Tree
13) Left view of a Tree
14) Right view of a Tree
15) Top view of a Tree
16) Bottom view of a Tree
17) Boundary Traversal of a tree
18) Diagonal Traversal of a tree
19) Diameter of a binary Tree
20) LCA of a binary tree
21) Convert binary tree into sum tree
22) Sum root to leaf numbers
23) Path sum
24) Min Depth of binary Tree
25) Check if all leaf nodes are present on the same level or not
26) Check if a binary tree is a subtree of another tree
27) Construct Binary Tree from given inorder and preorder traversal
28) Construct Binary Tree from given inorder and postorder
29) Binary Tree into DLL
30) Kth ancestor of a node in a Binary Tree
31) Check if a tree is balanced or not
Binary Search Trees
1) Find a value in a Binary Search Tree
2) Insertion of a node in a Binary Search Tree
3) Deletion of a node in Binary Search Tree
4) Find minimum value in a Binary Search Tree
5) Find maximum value in a Binary Search Tree
6) Find inorder successor in a Binary Search Tree
7) Find inorder predecessor in a Binary Search Tree
8) Check if a binary tree is a BST or not
9) LCA of 2 nodes in a BST
10) Kth smallest element in a BST
11) Kth largest element in a BST
12) Count pairs from 2 BSTs such that given sum is equal to target
13) Find the median of BST
14) Count BST nodes that lie in a given range
15) Largest BST in a binary tree
16) Flatten BST to sorted linked list
17) Construct BST from preorder traversal
18) Convert BST into balanced BST
19) Merge two BSTs
20) Replace every node with the least greatest node in the BST.
Graph Data Structure
1) Construct a graph from given data and run DFS
2) Implement BFS algorithm
3) Detect cycle in directed graph using DFS
4) Detect cycle in directed graph using BFS
5) Detect cycle in undirected graph using DFS
6) Detect cycle in undirected graph using BFS
7) Find the town judge
8) Flood fill
9) Word Search
10) Knight on chess board
11) Word Ladder 1
12) Word Ladder 2
13) Connected Components
14) Count islands
15) Count enclosed islands
16) Clone a graph
17) Dijkstra’s algorithm
18) Network Delay Time
19) Cheapest flights within k stops
20) Bellman Ford Algorithms
21) Network Delay Time
22) Cheapest flights with k stops
23) Detecting negative cycle using Bellman Ford Algorithm
24) Floyd Warshall Algorithm
25) Implement Topological Sort
26) Course Schedule 1
27) Course Schedule 2
28) Alien Dictionary
29) Water Jug Problem using BFS
30) Prim’s Algorithm
Linked List
1) Reverse a Linked List
2) Middle of the Linked List
3) Delete Node in a Linked List
4) Merge Two Sorted Linked List
5) Remove duplicates from sorted list
6) Intersection of two linked list
7) Linked List Cycle
8) Palindrome Linked List
9) Swapping Nodes in a Linked List
10) Odd Even Linked List
11) Remove nth node from Linked List
12) Add Two Numbers
13) Swap Nodes in Pairs
14) Split Linked List in Parts
15) Insertion sort on Linked List
16) Merge sort on Linked List
17) Copy list with random pointers
18) Remove zero sum from consecutive nodes from linked list
19) Merge k sorted Linked List
20) Reverse nodes in k group
21) Doubly Linked List
22) Adding a node at the front, at the end, after a node or before a node
23) Deleting a node from the front, from the end, after a node or before a node
24) Circular Doubly Linked List
25) Adding a node at the front, at the end, after a node or before a node
26) Deleting a node from the front, from the end, after a node or before a node
27) LRU Cache
28) LFU Cache
Dynamic Programming
1) Climbing Stairs
2) Min Cost Climbing Stairs
3) Max Cost Climbing Stairs
4) House Robbery 1
5) Fibonacci Number
6) Tribonacci Number
7) 0-1 Knapsack
8) Subset sum problem
9) Target Sum Problem
10) Equal Sum Partition Problem
11) Count the number of subsets with a given difference
12) Unbounded Knapsack
13) Rod Cutting
14) Coin Change 1
15) Coin change 2
16) Buy and Sell Stock 1
17) Buy and Sell Stock 2
18) Buy and Sell Stock 3
19) Buy and Sell Stock 4
20) Buy and Sell Stock with cooldown
21) Buy and Sell Stock with transaction fees
22) Count number of ways to reach given score
23) Jump Game 1
24) Jump Game 2
25) Nth Catalan Number
26) Combination of Balanced Parenthesis Problem
27) Maximum size square sub matrix with all 1s
28) Total number of ways to reach last cell
29) Minimum Falling Path Sum
30) Count number of ways to reach given score
Backtracking
1) Rat in a Maze Problem
2) N- Queen Problem
3) Print all solutions of N – queen
4) Remove Invalid parenthesis
5) Subset sum Problem
6) Combinational Sum
7) Print all permutations of an array
8) Print all permutations of a string
9) Tug of War
10) The Knight Tour Problem
Heap
1) Implement a Max Heap2) Implement a Min Heap
3) Implement Heap sort
4) Kth largest element in array
5) Kth smallest element in an array
6) Merge 2 sorted arrays
7) Maximum of all subarrays of size k
8) Merge k sorted arrays
9) Merge k sorted linked list
10) Connect n ropes with minimum cost
11) Check if a binary tree is a heap or not
12) Rearrange characters in a string such that not two characters are adjacent
13) Running median
C++ Programming Interview Questions
- What is C++?
- What is namespace in C++?
- How to input string in C++?
- What is operator overloading in C++?
- How to learn C++?
- What is the difference between C and C++?
- What is the difference between C and C++?
- What is template in C++?
- What is using namespace std in C++?
- How to download turbo C++ for windows 10?
- How to paste in turbo C++?
- What is pointer in C++?
- What is function in C++?
- What is destructor in C++?
- Who invented C++?
- How to convert integer to string in C++?
Top Python Interview questions
1. How will you improve the performance of a program in Python?
2. What are the benefits of using Python?
3. How will you specify source code encoding in a Python source file?
4. What is the use of PEP 8 in Python?
5. What is Pickling in Python?
6. How does memory management work in Python?
7. How will you perform Static Analysis on a Python Script?
8. What is the difference between a Tuple and List in Python?
9. What is a Python Decorator?
10. How are arguments passed in a Python method? By value or by
reference?
11. What is the difference between List and Dictionary data types in
Python?
12. What are the different built-in data types available in Python?
13. What is a Namespace in Python?
14. How will you concatenate multiple strings together in Python?
15. What is the use of Pass statement in Python?
16. What is the use of Slicing in Python?
17. What is the difference between Docstring in Python and Javadoc in
Java?
18. How do you perform unit testing for Python code?
19. What is the difference between an Iterator and Iterable in Python?
20. What is the use of Generator in Python?
21. What is the use of Generator in Python?
Operating System Interview questions
- Explain the main purpose of an operating system?
- What is demand paging?
- What are the advantages of a multiprocessor system?
- What is kernel?
- What are real-time systems?
- What is virtual memory?
- Describe the objective of multiprogramming.
- What are time sharing systems?
- What is SMP?
- How are server systems classified?
- What is asymmetric clustering?
- What is a thread?
- Give some benefits of multithreaded programming.
- Briefly explain FCFS.
- What is RR scheduling algorithm?
- What necessary conditions can lead to a deadlock situation in a
system? - Enumerate the different RAID levels.
- Describe Banker’s algorithm?
- What factors determine whether a detection-algorithm must be
utilized in a deadlock avoidance system? - Differentiate logical from physical address space.