Design a HashMap without using any built-in hash table libraries. To be specific, your design should include these functions:
SDE II Amazon
Bengaluru, Karnataka, India
Given two number represent by LinkedList, calculate the sum of the numbers and store the result in a new LinkedList. Each node of the linked list is represented by single-digit and the head node is the most significant digit.
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.
Given preorder and inorder traversal of a tree, construct the binary tree.
Construct Binary Tree from Inorder and Postorder Traversal. Given inorder and postorder traversal of a tree, construct the binary tree.
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3
Inverting a Binary Tree is a problem asked in a lot of interviews and we will be tackling it in a simple but efficient manner. Any tree-related problem should be attempted to be solved in a recursive approach since Tree is a localized data structure i.e small trees make up large trees.
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with another character while preserving the order of characters. No two characters may map to the same character but a character may map to itself.
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Given a matrix, A of size M x N of 0’s and 1’s. If an element is 0, set its entire row and column to 0.