Leetcode - Blind75 - P1 - Arrays

"Arrays are like the socks in your drawer; there’s always one missing when you need it the most!"

We covered the arrays(lists) in python earlier in this article. Building upon that, let's take a look at the list of Blind75 questions that are based on arrays and related concepts. This blog is part of my leetcode journey blog and you can access the complete list here.


Arrays are a fundamental concept in programming, serving as a cornerstone for storing and manipulating collections of data. They are defined as a linear data structure that holds elements of the same data type in contiguous memory locations. The simplicity of arrays lies in their ability to access elements directly through indices, which are typically zero-based, meaning the first element is at index 0.

Here's a quick overview of Lists/Arrays in python:

In the context of coding interviews, arrays are often the subject of problems due to their versatility and the variety of algorithms that can be applied to them. A notable collection of array-related problems is the “Blind 75” on LeetCode, which is a curated list of questions that are frequently encountered in technical interviews. These problems cover a range of topics, from simple array manipulations to complex algorithms requiring an in-depth understanding of data structures.

Here are a few examples of array-related questions from the Blind 75 list:

  • Two Sum: Given an array of integers, return indices of the two numbers such that they add up to a specific target.
  • Maximum Subarray: Find the contiguous subarray within an array which has the largest sum.
  • Rotate Image: You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).

Solving these problems requires a solid grasp of array operations, including indexing, slicing, and understanding time and space complexity. For instance, the Two Sum problem can be approached using a hash table to store and look up complement values efficiently, showcasing the importance of combining array manipulation with other data structures.


Array Questions in Blind75

1. Two Sum

LC No.
01
Minute
05
Level
E

Array Hash Table

Start

121. Best Time to BuySell Stock

LC No.
121
Minute
07
Level
E

Array Dynamic Prog

Start

217. Contains Duplicate

LC No.
217
Minute
04
Level
E

Array Hash Sorting

Start

Product of Array Except Self

LC No.
238.
Minute
07
Level
M

Array Prefix Sum

Start

53. Maximum Subarray

LC No.
53
Minute
05
Level
M

Array DP Divide Conquer

Start

152. Maximum Product Subarray

LC No.
152
Minute
07
Level
M

Array DP

Start

Find Min in Rotated Sorted Array

LC No.
153
Minute
09
Level
M

Array Binary Search

Start

Search in Rotated Sorted Array

LC No.
33
Minute
07
Level
M

Array Binary Search

Start

15. 3Sum

LC No.
15
Minute
06
Level
M

Array Pointers Sorting

Start

11. Container With Most Water

LC No.
11
Minute
07
Level
M

Array Pointers Greedy

Start





 

 

Comments

Popular posts from this blog

Index Clean-Up Scripts

forgot sa password and no logins are added

The SQL Server DBA’s Guide to Teradata