You are given some lists of regions where the first region of each list includes all other regions in that list. Naturally, if a region X contains another region Y then X is bigger than Y. Also by definition a region X contains itself.
SDE II Amazon
Bengaluru, Karnataka, India
Here we are going to write our own atoi() implementation in Java. Remember in Java you convert a string to an integer using the parseInt method of the Java Integer class. The parseInt method converts the String to an int, and throws a NumberFormatException if the string can’t be converted to an int type.
How to sort HashMap in Java by Keys
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
In a gold mine grid of size m * n, each cell in this mine has an integer representing the amount of gold in that cell, 0 if it is empty.
Given a string s, return the longest palindromic substring in s.
Given a non-empty array of integers, return the k most frequent elements.
Imagine you are writing a small compiler for your college project and one of the tasks (or say sub-tasks) for the compiler would be to detect if the parenthesis are in place or not.
On a broken calculator that has a number showing on its display, we can perform two operations
Given the root node of a binary search tree, return the sum of values of all nodes with a value between L and R (inclusive). The binary search tree is guaranteed to have unique values.