Company: google
All the problems asked by "google".
-
Leetcode 271 - Encode and Decode Strings
Design an algorithm to encode a list of strings into a single string and decode it back to the list, working with any set of characters.
-
LeetCode 36 - Valid Sudoku
Determine if a 9x9 Sudoku board is valid based on specific rules for rows, columns, and 3x3 sub-boxes.
-
Leetcode 128 - Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence with an O(n) time complexity algorithm.
-
Leetcode 57 - Insert Interval
Insert a new interval into a sorted array of non-overlapping intervals, merging overlapping intervals if necessary.
-
Leetcode 70 - Climbing Stairs
Determine the number of distinct ways to climb to the top of a staircase with 'n' steps, where each time you can climb 1 or 2 steps.
-
Leetcode 217 - Contains Duplicate
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.
-
Leetcode 121 - Best Time to Buy and Sell Stock
You want to maximize your profit by choosing a single day to buy one stock and a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction.
-
Leetcode 33 - Search in Rotated Sorted Array
Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums.
-
Leetcode 1 - Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.