Tip 1 : Participate in live contests on online coding websites as much as possible.
Tip 2 : Practice previous interview questions from internet.
Tip 3 : Revise Computer Science subjects like DBMS, OOPS thoroughly.
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.



You may make as many transactions as you want but can not have more than one transaction at a time i.e, if you have the stock, you need to sell it first, and then only you can buy it again.
You have been given the prices of 'N' stocks in an array where each array element represents the stock price for that day. You need to find the maximum profit which you can make by buying and selling the stocks. You may make as many transactions as you want but can not have more than one transaction at a time i.e, if you have the stock, you need to sell it first, and then only you can buy it again.
What is Normalization and tell its all forms(all 7 forms)?
Normalization is a database design technique that reduces data redundancy and eliminates undesirable characteristics like Insertion, Update and Deletion Anomalies. Normalization rules divides larger tables into smaller tables and links them using relationships. The purpose of Normalisation in SQL is to eliminate redundant (repetitive) data and ensure data is stored logically.
Here is a list of Normal Forms in SQL:
1NF (First Normal Form)
2NF (Second Normal Form)
3NF (Third Normal Form)
BCNF (Boyce-Codd Normal Form)
4NF (Fourth Normal Form)
5NF (Fifth Normal Form)
6NF (Sixth Normal Form)
What is semaphore in OS with example?
Semaphores are integer variables that are used to solve the critical section problem by using two atomic operations, wait and signal that are used for process synchronization. The definitions of wait and signal are as follows − Wait. The wait operation decrements the value of its argument S, if it is positive.



Input: Let the binary be as shown in the figure:
Output: Linked List: 15 -> 40 -> 62 -> 10 -> 20 -> NULL
Explanation: As shown in the figure, the right child of every node points to the next node, while the left node points to null.
Also, the nodes are in the same order as the pre-order traversal of the binary tree.
You are given a binary tree consisting of integer values. Your task is to convert the given binary tree into a linked list where the nodes of the linked list follow the same order as the pre-order traversal of the given binary tree.
Note:
Use the right pointer of the binary tree as the “next” pointer for the linked list and set the left pointer to NULL.
Design a chess game
We need to clarify a bunch of things first, for example:
Do we need a graphical environment? It is totally possible to code the game with no graphics at all
Do we need an artificial intelligence machine or is it just going to be human to human?
Do we want to support network gaming (e.g, why not?)
Once all this has been clarified, we can dive into the problem.
This question can be modelled in great detail using object orientation, here is my approach, basic objects required are
Game: Stores the whole game
Movement: Stores each of the players movements
Piece abstract class represents each of the pieces
Coordinate each of the 64 squares in the chess game
Knight, Tower, Pawn... all the pieces are implementations of the abstract class Piece
Basic object design
Game
String whitePlayer;
String blackPlayer;
boolean isBlackPlayerTurn();
boolean isWightePlayerTurn();
List
Movements:
String player;
String movement; // If you are a chess nerd, you will be familiar with stuff like "e4", "kf6" and so on :)
boolean goodMovement; // If you are familiar with chess, you know this is represented by "!"
boolean badMovement; // Again, if familiar with chess, this is represented by "?"
Piece (abstract):
String color; //Black white... we could consider an enum here
boolean alive;
boolean canMove; // In chess, sometimes a piece cannot be moved as it will be protecting the king.. that is called an illegal move, we will most likely raise a warning to the end user if he tries to do so.
List availableMovements; // All the places where a piece can move
PawnPiece (example concrete implementation):
List availableMovements; // Will need to implement this.
Coordinate:
Char row; //From 1 to 8
Char column; // From a to h

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?