First Round
i was asked one dsa question which is zigzag conversion of string https://leetcode.com/problems/zigzag-conversion/
Second Round
- Question 1
- Question 2
- Question 3
- Question 4
A Node is defined as a directory or file. If its a directory it can have sub-directories and files inside it. Write a function `deleteNode` which deletes the node and its childern recursively Given to you three functions/methods
isDirectory
which returns if the node is a directory or notgetChildren
if the node is a directory, and not empty returns all the contents inside itdelete
deletes the node if its a file or if an empty directory
I was asked to implement queue using stack you can find the solution here
Given a Sorted Linked list, convert it into a balanced BST
Given stock prices for n days, find the maximum profit that can be earned by buying and selling.