Leetcode Problem Dataset
Leetcode Dataset of 1,825 Problems
@kaggle.gzipchrist_leetcode_problem_dataset
Leetcode Dataset of 1,825 Problems
@kaggle.gzipchrist_leetcode_problem_dataset
idId | titleTitle | descriptionDescription | is_premiumIs Premium | difficultyDifficulty | solution_linkSolution Link | acceptance_rateAcceptance Rate | frequencyFrequency | urlUrl | discuss_countDiscuss Count | acceptedAccepted | submissionsSubmissions | companiesCompanies | related_topicsRelated Topics | likesLikes | dislikesDislikes | ratingRating | asked_by_faangAsked By Faang | similar_questionsSimilar Questions |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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`. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example 1: Input: nu… | Easy | /articles/two-sum | 46.7 | 100 | https://leetcode.com/problems/two-sum | 999 | 4.1M | 8.7M | Amazon,Google,Apple,Adobe,Microsoft,Bloomberg,Facebook,Oracle,Uber,Expedia,Twitter,Nagarro,SAP,Yahoo,Cisco,Qualcomm,tcs,Goldman Sachs,Yandex,ServiceNow | Array,Hash Table | 20217 | 712 | 97 | 1 | [3Sum, /problems/3sum/, Medium], [4Sum, /problems/4sum/, Medium], [Two Sum II - Input array is sorted, /problems/two-sum-ii-input-array-is-sorted/, Easy], [Two Sum III - Data structure design, /problems/two-sum-iii-data-structure-design/, Easy], [Subarray Sum Equals K, /problems/subarray-sum-equals-… | |
2 | Add Two Numbers | You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, except t… | Medium | /articles/add-two-numbers | 35.7 | 93.1 | https://leetcode.com/problems/add-two-numbers | 999 | 1.9M | 5.2M | Bloomberg,Microsoft,Amazon,Google,Facebook,Apple,Adobe,Paypal,Coupang,Oracle,Uber,VMware,Yahoo | Linked List,Math,Recursion | 11350 | 2704 | 81 | 1 | [Multiply Strings, /problems/multiply-strings/, Medium], [Add Binary, /problems/add-binary/, Easy], [Sum of Two Integers, /problems/sum-of-two-integers/, Medium], [Add Strings, /problems/add-strings/, Easy], [Add Two Numbers II, /problems/add-two-numbers-ii/, Medium], [Add to Array-Form of Integer, … | |
3 | Longest Substring Without Repeating Characters | Given a string `s`, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Input: s = "bbbbb" Output: 1 Explanation: The answer is "b", with the length of 1. Example 3:… | Medium | /articles/longest-substring-without-repeating-characters | 31.5 | 90.9 | https://leetcode.com/problems/longest-substring-without-repeating-characters | 999 | 2.1M | 6.7M | Amazon,Bloomberg,Microsoft,Facebook,Apple,Adobe,eBay,Goldman Sachs,Google,Alation,VMware,Oracle,ByteDance,Yahoo,Uber,SAP,Salesforce,Coupang,Splunk,Spotify | Hash Table,Two Pointers,String,Sliding Window | 13810 | 714 | 95 | 1 | [Longest Substring with At Most Two Distinct Characters, /problems/longest-substring-with-at-most-two-distinct-characters/, Medium], [Longest Substring with At Most K Distinct Characters, /problems/longest-substring-with-at-most-k-distinct-characters/, Medium], [Subarrays with K Different Integers, … | |
4 | Median of Two Sorted Arrays | Given two sorted arrays `nums1` and `nums2` of size `m` and `n` respectively, return the median of the two sorted arrays. Example 1: Input: nums1 = [1,3], nums2 = [2] Output: 2.00000 Explanation: merged array = [1,2,3] and median is 2. Example 2: Input: nums1 = [1,2], nums2 = [3,4] Output: 2.500… | Hard | /articles/median-of-two-sorted-arrays | 31.4 | 86.2 | https://leetcode.com/problems/median-of-two-sorted-arrays | 999 | 904.7K | 2.9M | Amazon,Goldman Sachs,Facebook,Microsoft,Apple,Adobe,Google,Bloomberg,Zillow,Uber,Flipkart,Paypal | Array,Binary Search,Divide and Conquer | 9665 | 1486 | 87 | 1 | nan | |
5 | Longest Palindromic Substring | Given a string `s`, return the longest palindromic substring in `s`. Example 1: Input: s = "babad" Output: "bab" Note: "aba" is also a valid answer. Example 2: Input: s = "cbbd" Output: "bb" Example 3: Input: s = "a" Output: "a" Example 4: Input: s = "ac" Output: "a" Constraints: `1 <= s.leng… | Medium | /articles/longest-palindromic-substring | 30.6 | 84.7 | https://leetcode.com/problems/longest-palindromic-substring | 999 | 1.3M | 4.1M | Amazon,Microsoft,Wayfair,Facebook,Adobe,eBay,Google,Oracle,Goldman Sachs,Yandex,Qualcomm | String,Dynamic Programming | 10271 | 670 | 94 | 1 | [Shortest Palindrome, /problems/shortest-palindrome/, Hard], [Palindrome Permutation, /problems/palindrome-permutation/, Easy], [Palindrome Pairs, /problems/palindrome-pairs/, Hard], [Longest Palindromic Subsequence, /problems/longest-palindromic-subsequence/, Medium], [Palindromic Substrings, /prob… | |
6 | ZigZag Conversion | The string `"PAYPALISHIRING"` is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: `"PAHNAPLSIIGYIR"` Write the code that will take a string a… | Medium | /articles/zigzag-conversion | 38.2 | 44.3 | https://leetcode.com/problems/zigzag-conversion | 999 | 558.8K | 1.5M | Microsoft | String | 2270 | 5686 | 29 | nan | ||
7 | Reverse Integer | 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 `[-231, 231 - 1]`, then return `0`. Assume the environment does not allow you to store 64-bit integers (signed or unsigned). Example 1: Input: x … | Easy | /articles/reverse-integer | 25.9 | 80.9 | https://leetcode.com/problems/reverse-integer | 999 | 1.5M | 5.7M | Amazon,Google,Apple,Facebook,Bloomberg,American Express,Microsoft,Adobe,Uber | Math | 4548 | 6971 | 39 | 1 | [String to Integer (atoi), /problems/string-to-integer-atoi/, Medium], [Reverse Bits, /problems/reverse-bits/, Easy] | |
8 | String to Integer (atoi) | Implement the `myAtoi(string s)` function, which converts a string to a 32-bit signed integer (similar to C/C++'s `atoi` function). The algorithm for `myAtoi(string s)` is as follows: Read in and ignore any leading whitespace. Check if the next character (if not already at the end of the string) i… | Medium | /articles/string-to-integer | 15.7 | 56 | https://leetcode.com/problems/string-to-integer-atoi | 999 | 716.1K | 4.6M | Facebook,Amazon,Microsoft,Google,Goldman Sachs,Apple,Adobe,Bloomberg,Intel | Math,String | 189 | 479 | 28 | 1 | [Reverse Integer, /problems/reverse-integer/, Easy], [Valid Number, /problems/valid-number/, Hard] | |
9 | Palindrome Number | Given an integer `x`, return `true` if `x` is palindrome integer. An integer is a palindrome when it reads the same backward as forward. For example, `121` is palindrome while `123` is not. Example 1: Input: x = 121 Output: true Example 2: Input: x = -121 Output: false Explanation: From left to … | Easy | /articles/palindrome-number | 50 | 58.2 | https://leetcode.com/problems/palindrome-number | 999 | 1.2M | 2.4M | Microsoft,Adobe,Bloomberg,Facebook,Google,Yahoo | Math | 3199 | 1724 | 65 | 1 | [Palindrome Linked List, /problems/palindrome-linked-list/, Easy] | |
10 | Regular Expression Matching | Given an input string (`s`) and a pattern (`p`), implement regular expression matching with support for `'.'` and `'*'` where:` ` `'.'` Matches any single character. `'*'` Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). Example 1… | Hard | /articles/regular-expression-matching | 27.4 | 75 | https://leetcode.com/problems/regular-expression-matching | 999 | 526.6K | 1.9M | Facebook,Amazon,Microsoft,Google,Adobe,Coursera,Apple | String,Dynamic Programming,Backtracking | 5583 | 841 | 87 | 1 | [Wildcard Matching, /problems/wildcard-matching/, Hard] |
CREATE TABLE leetcode_dataset_lc (
"id" BIGINT,
"title" VARCHAR,
"description" VARCHAR,
"is_premium" BIGINT,
"difficulty" VARCHAR,
"solution_link" VARCHAR,
"acceptance_rate" DOUBLE,
"frequency" DOUBLE,
"url" VARCHAR,
"discuss_count" BIGINT,
"accepted" VARCHAR,
"submissions" VARCHAR,
"companies" VARCHAR,
"related_topics" VARCHAR,
"likes" BIGINT,
"dislikes" BIGINT,
"rating" BIGINT,
"asked_by_faang" BIGINT,
"similar_questions" VARCHAR
);
Anyone who has the link will be able to view this.