Adobe

Check if Array is Sorted

Determine if an array is sorted in ascending, descending, or not sorted at all

Climbing Stairs

Count the number of distinct ways to reach the top of n stairs

Clone Graph

Create a deep copy of an undirected graph represented with adjacency lists

Connect Ropes with Minimum Cost

Connect ropes with minimum cost using greedy approach with heap

Course Schedule

Determine if you can finish all courses given prerequisite relationships using topological sorting

Find the Second Largest Element in an Array

Find and return the second largest element in an array of integers

Implement Stack

Design and implement a stack data structure with push, pop, top, and empty operations

Is Graph Bipartite

Check if a graph can be colored with exactly two colors such that no two adjacent nodes have the same color

Largest Rectangle in Histogram

Find the largest rectangle that can be formed in a histogram

Longest Palindromic Substring

Find the longest palindromic substring in a given string

Longest Substring Without Repeating Characters

Find the length of the longest substring without repeating characters

Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time

Minimum Window Substring

Find the minimum window substring that contains all characters of another string

Move All Zeros to the End

Move all zeros in an array to the end while maintaining the relative order of non-zero elements

Network Delay Time (Dijkstra's Algorithm)

Find the time it takes for a signal to reach all nodes in a network using shortest path algorithms

Regular Expression Matching

Implement regular expression matching with support for '.' and '*'

Reorganize String

Reorganize string so no two adjacent characters are the same

Reverse an Array

Reverse the order of elements in an array in-place and return the modified array

Rotate Array by K Steps

Rotate an array to the right by k steps where k is non-negative

Rotten Oranges Problem

Find the minimum time for all oranges to rot using BFS

Serialize and Deserialize Binary Tree

Serialize a binary tree to a string and deserialize it back to the original tree

Sliding Window Maximum

Find the maximum element in each sliding window of size k

Smallest Substring with All Characters

Find the smallest substring that contains all characters of a given pattern

Sort Characters by Frequency

Sort characters in string by frequency using heap or bucket sort

Stock Span Problem

Calculate the span of stock prices for each day

Task Scheduler

Schedule tasks with cooling period using greedy approach with heap

Trapping Rain Water

Calculate how much rainwater can be trapped between bars of different heights

Valid Parentheses

Determine if the input string has valid brackets that are properly opened and closed

Vertical Order Traversal of Binary Tree

Traverse a binary tree vertically and return nodes by columns

Word Ladder

Find the shortest transformation sequence from beginWord to endWord using single character changes

Zigzag Level Order Traversal

Traverse a binary tree level by level in zigzag order