Adobe

14 DSA problems asked in Adobe coding interviews

7 Easy
6 Medium
1 Hard

14 problems

Arrays & Hashing
4
Two Sum
Easy

Given an array of integers, return indices of the two numbers such that they add up to a specific target.

Valid Anagram
Easy

Given two strings s and t, return true if t is an anagram of s, and false otherwise.

Contains Duplicate II
Easy

Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k.

4Sum
Medium

Find all unique quadruplets in the array which gives the sum of target.

Binary Search
1
Median of Two Sorted Arrays
Hard

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).

Bit Manipulation
1
Single Number
Easy

Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with linear runtime complexity and use only constant extra space.

Dynamic Programming
2
Climbing Stairs
Easy

You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

Longest Palindromic Substring
Medium

Given a string s, return the longest palindromic substring in s.

Linked List
2
Reverse Linked List
Easy

Given the head of a singly linked list, reverse the list, and return the reversed list.

Merge Two Sorted Lists
Easy

You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists.

Math
1
Reverse Integer
Medium

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range, return 0.

Sliding Window
1
Longest Substring Without Repeating Characters
Medium

Given a string s, find the length of the longest substring without repeating characters.

Trees
1
Validate Binary Search Tree
Medium

Given the root of a binary tree, determine if it is a valid binary search tree (BST).

Two Pointers
1
3Sum
Medium

Find all unique triplets in the array which gives the sum of zero.