Tip 1 : Prepare data structures and algorithms along with problem solving
Tip 2 : Prepare atleast two projects to have some knowledge of development
Tip 3 : Be confident while giving the interviews
Tip 1: Don't put irrelevent information in your resume for the sake of filling the page
Tip 2: Have 2 or 3 good projects and put only the technoligies and programming languages to which you are really confident.
The interview was scheduled at 10:00 AM



str = "ababc"
The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome.
There is another palindromic substring of length 3 is "bab". Since starting index of "aba" is less than "bab", so "aba" is the answer.
First I gave the bruteforce approach to the problem whose time complexity was N^3 then inteviewer asked to optimise it.
My optimised approach:
Step-1: Iterate through the string and for each index find the longest palindromic substring whose middle element is ith character by two poonter approach
Step-2 : Also for even length possible palindrome find the longest palindrome taking ith and (i+1)th character as two middle elements
Step-3: Update your ans everytime you get the larger palindrome



1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then (2, -3, 1), (-3, 2, 1) etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Step-1: Sort the array nums and iterate over the array
Step-2 : Use nums[i] as the pivot element.
Step-3: Now create two pointers low and high, where low is positioned at i+1 and high at the end of the array i.e.) n-1.
Step-4: If the triplet (nums[i], nums[low], nums[high]) sums upto 0, sort the triplet and push it in ans vector.
to make sure no duplicate triplet is pushed in the answer vetor, decrease high and increase low until you have reached another distinct element.
Step-5: If the triplet sums to greater than 0, decrease the high pointer.
Step-6: If the triplet sums to less than 0, increase the low pointer.
Step-7: To maintain distinct pivot elements, increase i till it reaches the next distinct element.
Interview was scheduled at 2:00 pm and I was alone in the room
Interviewer was very humble and supportive
This was basically a system design round but interviewer asked about my hobbies, projects and also some questions from OS and DBMS
Design a Lift using oops concept
Tip 1: First understand the requirements of the problem
Tip 2: Don't think of the best solution immediately as you cannot design the lift and make all required classes at one go
Tip 3: Following are the some necessary classes in the lift design:
Class ExternalRequest (Requested floor, directionToGo)
Class InternalRequest (Destination floor)
Class Elevetor (direction, current state, current floor)
Enum Direction (UP, DOWN)
Enum State (IDLE, MOVING, STOPPED)
What is the difference between process and a program
Tip 1: Give your answer confidently
Tip 2: Give answer to the point only
Answer:
Process is an instance of an executing program. For example, we write our computer programs in a text file and when we execute this program, it becomes a process which performs all the tasks mentioned in the program.
Program is a set of instructions to perform a certain task. Eg: chrome.exe, notepad.exe
What are ACID properties
Tip 1: First give abbreviation for each character in ACID
Tip 2: Then explain each properties seperately
Answer:
Atomicity: By this, we mean that either the entire transaction takes place at once or doesn’t happen at all.
Consistency: This means that integrity constraints must be maintained so that the database is consistent before and after the transaction.
Isolation: This property ensures that multiple transactions can occur concurrently without leading to the inconsistency of the database state.
Durability: This property ensures that once the transaction has completed execution, the updates and modifications to the database are stored in and written to disk and they persist even if a system failure occurs.

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