Tip 1 : Graph should be on your tips.
Tip 2 : while explaining the solution to interviewer, dont just hop onto the most optimal solution. Start with the brute force one, give the cons of brute force solution, and then go step by step till you reach the optimal solution.
Tip 3 : Improve on your communication skills as well.
Tip 1 : Mention only what is required for your profile, for e.g. do not stress too much on your co curricular stuff. Rather, try explaining more of your technical stuff that is relevant for your job.
Tip 2 : keep it limited to 1 page. And make sure its a pdf and not an image.
'S' = "{}()".
There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
You're given string ‘STR’ consisting solely of “{“, “}”, “(“, “)”, “[“ and “]” . Determine whether the parentheses are balanced.
You need to return the head to the doubly linked list.
The doubly linked list would be: 1 2 3 4 5 and can be represented as:
Given a Binary Tree, convert this binary tree to a Doubly Linked List.
A Binary Tree (BT) is a data structure in which each node has at most two children.
A Doubly Linked List contains a previous pointer, along with the next pointer and data.
The order of nodes in Doubly Linked List must be the same as Inorder of the given Binary Tree.
The doubly linked list should be returned by taking the next pointer as right and the previous pointer as left.
1. Day is represented as {"1st", "2nd", "3rd", "4th",”5th”, ...,”29th”, "30th", "31st"}.
2. Month is represented as {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}.
3. Year is represented as {2020,2021 etc}
1. YYYY is a 4 digit year.
2. MM is a 2 digit month.
3. DD is a 2 digit day.
1. The given dates are guaranteed to be valid.
2. If you can’t represent a month in 2 digits then append 0 in front of the month. Eg: if the month is Jan, represent it as 01 and not as 1 in the answer.
3. If you can’t represent a day in 2 digits then append 0 in front of the day. Eg: if the day is 5, represent it as 05 and not as 5 in the answer.
You are given a string ‘S’ representing a date in the “Day Month Year” format, where:
1. Day is represented as {"1st", "2nd", "3rd", "4th",”5th”, ...,”29th”, "30th", "31st"}.
2. Month is represented as {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}.
3. Year is represented as {2020,2021 etc}
Your Task Is To Convert The Given Date Into “YYYY-MM-DD” Format, Where:
1. YYYY is a 4 digit year.
2. MM is a 2 digit month.
3. DD is a 2 digit day.
Two islands are considered to be the same if and only if one island is equal to another(not rotated or reflected) i.e if we can translate one island on another without rotating or reflecting then it would be considered as the same islands.
1 1 0
0 0 1
0 0 1
In this example, we have two islands and they would be considered as distinct islands as we can not translate them on one another even if they have the same no of 1's.
1 1 0 0 0
1 1 0 0 0
0 0 0 1 1
0 0 0 1 1
In this example, we have two islands and they are the same as we can translate one island onto another island, so our answer should be 1.
You are given a two-dimensional array/list of integers consisting of 0s and 1s. In the list, 1 represents land and 0 represents water.
The task is to find the number of distinct islands where a group of connected 1s(horizontally or vertically) forms an island.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is 3 + 2 * 4 based on operator precedence?