Tip 1 : Prepare well on the OOPs concepts (Abstraction, Encapsulation, Polymorphism etc..)
Tip 2 : The DSA round can have at max LeetCode medium questions. So preparing 100-150 questions should be enough over there.
Tip 3 : Be confident and have multiple ways to approach a problem that will make a you solid person.
Tip 4 : Be good at the language of your choice for example in java how would you refactor a code using functional programming as opposed to procedural programming.
Tip 5 : Have 1-2 projects done related to the role that you are applying for
Tip 6 : Review your resume for grammatical errors and use action verbs while describing your projects.
Tip 1 : Check your resume for grammatical mistakes.
Tip 2 : Share the github link for your projects.
Tip 3 : Share the live link for your project.
Tip 4 : Use actions verbs to describe the project like Built, Created etc..
Tip 5 : Segregate the skills based on how proficient you are with them (Beginner, Intermediate, Advanced)
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
For iteration, we create a ListNode rev to keep track of what we have reversed otherwise we would lose it. Then we iterate linked list and make head point to the current node. We change a -> to <- by calling head.next = rev, update rev by calling rev = head, move to next node by calling head = head.next. To save a temporary variable, we could assign these variables in one line, but head.next and rev should be updated before head is updated otherwise direction would not be reversed and rev would keep pointing to itself.
For example, 1->2->3, 1 is current node head, what we have reversed rev is None, 2 is head.next. Calling head.next = rev leads to None<-1. Calling head = head.next concurrently to make head pointing to 2->3. Updating rev as 1->None. And in next iteration, we will change 2->3 to 1<-2 and keep changing -> to <- so on so forth.
I didn't know the actual solution to this problem at that time.
I used a dictionary to maintain the relation between the new ListNode and the old ListNode
In a loop I create new nodes against all the old nodes in the dictionary
In the 2nd loop I created the pointers between new nodes in the dictionary.
For the given binary tree
The level order traversal will be {1,2,3,4,5,6,7}.
Maintain a queue and the level at which you are currently at and then keep on adding the nodes corresponding to the level in the answers list.
I was provided some tax calculation system. Now how would I extend the functionality to calculate some new kind of tax?
Tip 1 : Learn the OOPs concepts well
Tip 2 : Focus more on how could you apply different OOPs concepts
Tip 3 : Be aware of the SOLID principles
What's your understanding about Abstraction?
Where would you use polymorphism?
Write the singleton class?
Tip 1 : Learn the OOPs concepts well
Tip 2 : Focus more on how could you apply different OOPs concepts
Tip 3 : Be aware of the SOLID principles
Basic HR Questions were asked.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL keyword removes duplicate records from a result set?