Skip to main content

Salesforce LeetCode Questions

IDURLTitleDifficultyAcceptance %Frequency %
3https://leetcode.com/problems/longest-substring-without-repeating-charactersLongest Substring Without Repeating CharactersMedium38.5%62.5%
5https://leetcode.com/problems/longest-palindromic-substringLongest Palindromic SubstringMedium37.3%50.0%
11https://leetcode.com/problems/container-with-most-waterContainer With Most WaterMedium59.5%50.0%
12https://leetcode.com/problems/integer-to-romanInteger to RomanMedium70.4%50.0%
13https://leetcode.com/problems/roman-to-integerRoman to IntegerEasy66.2%37.5%
15https://leetcode.com/problems/3sum3SumMedium38.6%37.5%
20https://leetcode.com/problems/valid-parenthesesValid ParenthesesEasy43.7%37.5%
23https://leetcode.com/problems/merge-k-sorted-listsMerge k Sorted ListsHard58.8%37.5%
33https://leetcode.com/problems/search-in-rotated-sorted-arraySearch in Rotated Sorted ArrayMedium44.1%37.5%
39https://leetcode.com/problems/combination-sumCombination SumMedium76.1%25.0%
41https://leetcode.com/problems/first-missing-positiveFirst Missing PositiveHard42.4%37.5%
42https://leetcode.com/problems/trapping-rain-waterTrapping Rain WaterHard66.8%50.0%
49https://leetcode.com/problems/group-anagramsGroup AnagramsMedium72.2%62.5%
50https://leetcode.com/problems/powx-nPow(x, n)Medium38.2%25.0%
51https://leetcode.com/problems/n-queensN-QueensHard74.9%25.0%
56https://leetcode.com/problems/merge-intervalsMerge IntervalsMedium51.1%62.5%
75https://leetcode.com/problems/sort-colorsSort ColorsMedium69.1%37.5%
76https://leetcode.com/problems/minimum-window-substringMinimum Window SubstringHard46.9%50.0%
98https://leetcode.com/problems/validate-binary-search-treeValidate Binary Search TreeMedium35.3%50.0%
115https://leetcode.com/problems/distinct-subsequencesDistinct SubsequencesHard51.5%62.5%
2035https://leetcode.com/problems/partition-array-into-two-arrays-to-minimize-sum-differencePartition Array Into Two Arrays to Minimize Sum DifferenceHard23.0%25.0%
124https://leetcode.com/problems/binary-tree-maximum-path-sumBinary Tree Maximum Path SumHard42.0%62.5%
121https://leetcode.com/problems/best-time-to-buy-and-sell-stockBest Time to Buy and Sell StockEasy56.4%50.0%
2068https://leetcode.com/problems/check-whether-two-strings-are-almost-equivalentCheck Whether Two Strings are Almost EquivalentEasy64.1%62.5%
139https://leetcode.com/problems/word-breakWord BreakMedium49.1%50.0%
146https://leetcode.com/problems/lru-cacheLRU CacheMedium46.8%75.0%
155https://leetcode.com/problems/min-stackMin StackMedium57.7%50.0%
200https://leetcode.com/problems/number-of-islandsNumber of IslandsMedium63.8%62.5%
210https://leetcode.com/problems/course-schedule-iiCourse Schedule IIMedium55.0%62.5%
215https://leetcode.com/problems/kth-largest-element-in-an-arrayKth Largest Element in an ArrayMedium68.8%50.0%
221https://leetcode.com/problems/maximal-squareMaximal SquareMedium50.0%50.0%
236https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-treeLowest Common Ancestor of a Binary TreeMedium68.7%25.0%
238https://leetcode.com/problems/product-of-array-except-selfProduct of Array Except SelfMedium68.6%37.5%
253https://leetcode.com/problems/meeting-rooms-iiMeeting Rooms IIMedium52.5%37.5%
283https://leetcode.com/problems/move-zeroesMove ZeroesEasy63.5%37.5%
295https://leetcode.com/problems/find-median-from-data-streamFind Median from Data StreamHard54.2%37.5%
322https://leetcode.com/problems/coin-changeCoin ChangeMedium47.9%50.0%
2296https://leetcode.com/problems/design-a-text-editorDesign a Text EditorHard49.9%50.0%
347https://leetcode.com/problems/top-k-frequent-elementsTop K Frequent ElementsMedium65.8%50.0%
370https://leetcode.com/problems/range-additionRange AdditionMedium72.9%25.0%
394https://leetcode.com/problems/decode-stringDecode StringMedium62.2%37.5%
410https://leetcode.com/problems/split-array-largest-sumSplit Array Largest SumHard59.8%37.5%
443https://leetcode.com/problems/string-compressionString CompressionMedium59.5%87.5%
460https://leetcode.com/problems/lfu-cacheLFU CacheHard48.6%75.0%
2484https://leetcode.com/problems/count-palindromic-subsequencesCount Palindromic SubsequencesHard41.0%50.0%
2592https://leetcode.com/problems/maximize-greatness-of-an-arrayMaximize Greatness of an ArrayMedium61.2%50.0%
621https://leetcode.com/problems/task-schedulerTask SchedulerMedium62.6%25.0%
628https://leetcode.com/problems/maximum-product-of-three-numbersMaximum Product of Three NumbersEasy45.7%62.5%
647https://leetcode.com/problems/palindromic-substringsPalindromic SubstringsMedium72.5%62.5%
2563https://leetcode.com/problems/count-the-number-of-fair-pairsCount the Number of Fair PairsMedium52.7%62.5%
696https://leetcode.com/problems/count-binary-substringsCount Binary SubstringsEasy70.2%50.0%
713https://leetcode.com/problems/subarray-product-less-than-kSubarray Product Less Than KMedium53.9%75.0%
735https://leetcode.com/problems/asteroid-collisionAsteroid CollisionMedium47.1%50.0%
739https://leetcode.com/problems/daily-temperaturesDaily TemperaturesMedium68.3%37.5%
895https://leetcode.com/problems/maximum-frequency-stackMaximum Frequency StackHard66.6%62.5%
994https://leetcode.com/problems/rotting-orangesRotting OrangesMedium58.1%37.5%
2866https://leetcode.com/problems/beautiful-towers-iiBeautiful Towers IIMedium36.2%62.5%
2865https://leetcode.com/problems/beautiful-towers-iBeautiful Towers IMedium44.3%62.5%
1150https://leetcode.com/problems/check-if-a-number-is-majority-element-in-a-sorted-arrayCheck If a Number Is Majority Element in a Sorted ArrayEasy59.9%62.5%
1051https://leetcode.com/problems/height-checkerHeight CheckerEasy81.5%62.5%
2946https://leetcode.com/problems/matrix-similarity-after-cyclic-shiftsMatrix Similarity After Cyclic ShiftsEasy59.3%62.5%
2957https://leetcode.com/problems/remove-adjacent-almost-equal-charactersRemove Adjacent Almost-Equal CharactersMedium53.1%75.0%
2992https://leetcode.com/problems/number-of-self-divisible-permutationsNumber of Self-Divisible PermutationsMedium71.7%62.5%
3125https://leetcode.com/problems/maximum-number-that-makes-result-of-bitwise-and-zeroMaximum Number That Makes Result of Bitwise AND ZeroMedium70.3%62.5%
3171https://leetcode.com/problems/find-subarray-with-bitwise-or-closest-to-kFind Subarray With Bitwise OR Closest to KHard30.8%62.5%
3135https://leetcode.com/problems/equalize-strings-by-adding-or-removing-characters-at-endsEqualize Strings by Adding or Removing Characters at EndsMedium56.6%62.5%
1268https://leetcode.com/problems/search-suggestions-systemSearch Suggestions SystemMedium65.2%62.5%
3193https://leetcode.com/problems/count-the-number-of-inversionsCount the Number of InversionsHard29.7%62.5%
3197https://leetcode.com/problems/find-the-minimum-area-to-cover-all-ones-iiFind the Minimum Area to Cover All Ones IIHard63.5%62.5%
3195https://leetcode.com/problems/find-the-minimum-area-to-cover-all-ones-iFind the Minimum Area to Cover All Ones IMedium78.2%62.5%
3200https://leetcode.com/problems/maximum-height-of-a-triangleMaximum Height of a TriangleEasy44.1%62.5%
1326https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-gardenMinimum Number of Taps to Open to Water a GardenHard51.0%62.5%
1492https://leetcode.com/problems/the-kth-factor-of-nThe kth Factor of nMedium70.2%37.5%
1659https://leetcode.com/problems/maximize-grid-happinessMaximize Grid HappinessHard40.8%62.5%
1701https://leetcode.com/problems/average-waiting-timeAverage Waiting TimeMedium73.1%62.5%
2954https://leetcode.com/problems/count-the-number-of-infection-sequencesCount the Number of Infection SequencesHard37.2%25.0%
127https://leetcode.com/problems/word-ladderWord LadderHard44.9%37.5%
1315https://leetcode.com/problems/sum-of-nodes-with-even-valued-grandparentSum of Nodes with Even-Valued GrandparentMedium85.9%50.0%
494https://leetcode.com/problems/target-sumTarget SumMedium51.8%25.0%
831https://leetcode.com/problems/masking-personal-informationMasking Personal InformationMedium53.9%25.0%
2966https://leetcode.com/problems/divide-array-into-arrays-with-max-differenceDivide Array Into Arrays With Max DifferenceMedium79.0%50.0%
233https://leetcode.com/problems/number-of-digit-oneNumber of Digit OneHard37.7%50.0%
1https://leetcode.com/problems/two-sumTwo SumEasy57.1%50.0%
152https://leetcode.com/problems/maximum-product-subarrayMaximum Product SubarrayMedium36.0%25.0%
1552https://leetcode.com/problems/magnetic-force-between-two-ballsMagnetic Force Between Two BallsMedium71.9%50.0%
924https://leetcode.com/problems/minimize-malware-spreadMinimize Malware SpreadHard42.9%62.5%
2025https://leetcode.com/problems/maximum-number-of-ways-to-partition-an-arrayMaximum Number of Ways to Partition an ArrayHard35.4%25.0%
472https://leetcode.com/problems/concatenated-wordsConcatenated WordsHard49.7%25.0%
1710https://leetcode.com/problems/maximum-units-on-a-truckMaximum Units on a TruckEasy74.6%50.0%
2472https://leetcode.com/problems/maximum-number-of-non-overlapping-palindrome-substringsMaximum Number of Non-overlapping Palindrome SubstringsHard43.3%25.0%
3313https://leetcode.com/problems/find-the-last-marked-nodes-in-treeFind the Last Marked Nodes in TreeHard55.4%62.5%
2231https://leetcode.com/problems/largest-number-after-digit-swaps-by-parityLargest Number After Digit Swaps by ParityEasy65.0%50.0%
2964https://leetcode.com/problems/number-of-divisible-triplet-sumsNumber of Divisible Triplet SumsMedium67.6%50.0%
79https://leetcode.com/problems/word-searchWord SearchMedium46.8%50.0%
532https://leetcode.com/problems/k-diff-pairs-in-an-arrayK-diff Pairs in an ArrayMedium45.6%50.0%
53https://leetcode.com/problems/maximum-subarrayMaximum SubarrayMedium53.0%50.0%
1297https://leetcode.com/problems/maximum-number-of-occurrences-of-a-substringMaximum Number of Occurrences of a SubstringMedium54.2%75.0%
692https://leetcode.com/problems/top-k-frequent-wordsTop K Frequent WordsMedium60.0%37.5%
255https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-treeVerify Preorder Sequence in Binary Search TreeMedium51.7%37.5%
17https://leetcode.com/problems/letter-combinations-of-a-phone-numberLetter Combinations of a Phone NumberMedium65.5%25.0%
25https://leetcode.com/problems/reverse-nodes-in-k-groupReverse Nodes in k-GroupHard65.3%50.0%
329https://leetcode.com/problems/longest-increasing-path-in-a-matrixLongest Increasing Path in a MatrixHard56.3%50.0%
366https://leetcode.com/problems/find-leaves-of-binary-treeFind Leaves of Binary TreeMedium81.3%37.5%
224https://leetcode.com/problems/basic-calculatorBasic CalculatorHard46.5%25.0%
973https://leetcode.com/problems/k-closest-points-to-originK Closest Points to OriginMedium68.7%25.0%
636https://leetcode.com/problems/exclusive-time-of-functionsExclusive Time of FunctionsMedium66.1%25.0%
1200https://leetcode.com/problems/minimum-absolute-differenceMinimum Absolute DifferenceEasy75.0%50.0%
134https://leetcode.com/problems/gas-stationGas StationMedium47.5%50.0%
300https://leetcode.com/problems/longest-increasing-subsequenceLongest Increasing SubsequenceMedium59.0%37.5%
2515https://leetcode.com/problems/shortest-distance-to-target-string-in-a-circular-arrayShortest Distance to Target String in a Circular ArrayEasy50.6%25.0%
239https://leetcode.com/problems/sliding-window-maximumSliding Window MaximumHard48.4%37.5%
6https://leetcode.com/problems/zigzag-conversionZigzag ConversionMedium53.5%50.0%
863https://leetcode.com/problems/all-nodes-distance-k-in-binary-treeAll Nodes Distance K in Binary TreeMedium67.4%50.0%
289https://leetcode.com/problems/game-of-lifeGame of LifeMedium72.3%25.0%
767https://leetcode.com/problems/reorganize-stringReorganize StringMedium56.8%25.0%
3398https://leetcode.com/problems/smallest-substring-with-identical-characters-iSmallest Substring With Identical Characters IHard20.3%75.0%
3399https://leetcode.com/problems/smallest-substring-with-identical-characters-iiSmallest Substring With Identical Characters IIHard40.2%75.0%
1944https://leetcode.com/problems/number-of-visible-people-in-a-queueNumber of Visible People in a QueueHard72.3%37.5%
1046https://leetcode.com/problems/last-stone-weightLast Stone WeightEasy66.3%25.0%
437https://leetcode.com/problems/path-sum-iiiPath Sum IIIMedium46.3%25.0%
1004https://leetcode.com/problems/max-consecutive-ones-iiiMax Consecutive Ones IIIMedium67.3%37.5%
2077https://leetcode.com/problems/paths-in-maze-that-lead-to-same-roomPaths in Maze That Lead to Same RoomMedium56.5%25.0%
4https://leetcode.com/problems/median-of-two-sorted-arraysMedian of Two Sorted ArraysHard45.9%37.5%
135https://leetcode.com/problems/candyCandyHard47.9%25.0%
2008https://leetcode.com/problems/maximum-earnings-from-taxiMaximum Earnings From TaxiMedium46.2%25.0%
1481https://leetcode.com/problems/least-number-of-unique-integers-after-k-removalsLeast Number of Unique Integers after K RemovalsMedium63.7%25.0%
844https://leetcode.com/problems/backspace-string-compareBackspace String CompareEasy49.8%25.0%
875https://leetcode.com/problems/koko-eating-bananasKoko Eating BananasMedium49.7%37.5%
1221https://leetcode.com/problems/split-a-string-in-balanced-stringsSplit a String in Balanced StringsEasy87.3%62.5%
1335https://leetcode.com/problems/minimum-difficulty-of-a-job-scheduleMinimum Difficulty of a Job ScheduleHard59.7%37.5%
3488https://leetcode.com/problems/closest-equal-element-queriesClosest Equal Element QueriesMedium32.7%75.0%
2571https://leetcode.com/problems/minimum-operations-to-reduce-an-integer-to-0Minimum Operations to Reduce an Integer to 0Medium61.0%100.0%
1143https://leetcode.com/problems/longest-common-subsequenceLongest Common SubsequenceMedium58.9%62.5%
353https://leetcode.com/problems/design-snake-gameDesign Snake GameMedium40.0%25.0%
3540https://leetcode.com/problems/minimum-time-to-visit-all-housesMinimum Time to Visit All HousesMedium69.3%62.5%
724https://leetcode.com/problems/find-pivot-indexFind Pivot IndexEasy62.1%25.0%
2488https://leetcode.com/problems/count-subarrays-with-median-kCount Subarrays With Median KHard47.6%50.0%
465https://leetcode.com/problems/optimal-account-balancingOptimal Account BalancingHard50.3%37.5%
3295https://leetcode.com/problems/report-spam-messageReport Spam MessageMedium48.5%50.0%
162https://leetcode.com/problems/find-peak-elementFind Peak ElementMedium46.8%25.0%
535https://leetcode.com/problems/encode-and-decode-tinyurlEncode and Decode TinyURLMedium86.6%25.0%
21https://leetcode.com/problems/merge-two-sorted-listsMerge Two Sorted ListsEasy67.9%37.5%
3607https://leetcode.com/problems/power-grid-maintenancePower Grid MaintenanceMedium56.3%62.5%
125https://leetcode.com/problems/valid-palindromeValid PalindromeEasy52.8%37.5%
3613https://leetcode.com/problems/minimize-maximum-component-costMinimize Maximum Component CostMedium43.4%62.5%
768https://leetcode.com/problems/max-chunks-to-make-sorted-iiMax Chunks To Make Sorted IIHard54.7%25.0%
740https://leetcode.com/problems/delete-and-earnDelete and EarnMedium57.1%62.5%
894https://leetcode.com/problems/all-possible-full-binary-treesAll Possible Full Binary TreesMedium82.8%37.5%
815https://leetcode.com/problems/bus-routesBus RoutesHard47.1%25.0%
2918https://leetcode.com/problems/minimum-equal-sum-of-two-arrays-after-replacing-zerosMinimum Equal Sum of Two Arrays After Replacing ZerosMedium50.2%25.0%
85https://leetcode.com/problems/maximal-rectangleMaximal RectangleHard58.1%25.0%
545https://leetcode.com/problems/boundary-of-binary-treeBoundary of Binary TreeMedium47.9%50.0%
2451https://leetcode.com/problems/odd-string-differenceOdd String DifferenceEasy61.8%50.0%
337https://leetcode.com/problems/house-robber-iiiHouse Robber IIIMedium55.6%25.0%
2345https://leetcode.com/problems/finding-the-number-of-visible-mountainsFinding the Number of Visible MountainsMedium37.2%25.0%
1319https://leetcode.com/problems/number-of-operations-to-make-network-connectedNumber of Operations to Make Network ConnectedMedium66.1%25.0%
703https://leetcode.com/problems/kth-largest-element-in-a-streamKth Largest Element in a StreamEasy60.7%25.0%
992https://leetcode.com/problems/subarrays-with-k-different-integersSubarrays with K Different IntegersHard67.5%37.5%
652https://leetcode.com/problems/find-duplicate-subtreesFind Duplicate SubtreesMedium60.6%25.0%
1209https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-iiRemove All Adjacent Duplicates in String IIMedium60.9%37.5%
630https://leetcode.com/problems/course-schedule-iiiCourse Schedule IIIHard41.4%25.0%
743https://leetcode.com/problems/network-delay-timeNetwork Delay TimeMedium59.7%37.5%
332https://leetcode.com/problems/reconstruct-itineraryReconstruct ItineraryHard44.3%37.5%
268https://leetcode.com/problems/missing-numberMissing NumberEasy71.6%37.5%
213https://leetcode.com/problems/house-robber-iiHouse Robber IIMedium44.6%25.0%
502https://leetcode.com/problems/ipoIPOHard53.3%25.0%
2380https://leetcode.com/problems/time-needed-to-rearrange-a-binary-stringTime Needed to Rearrange a Binary StringMedium52.6%75.0%
1219https://leetcode.com/problems/path-with-maximum-goldPath with Maximum GoldMedium68.3%37.5%
355https://leetcode.com/problems/design-twitterDesign TwitterMedium44.2%37.5%
1522https://leetcode.com/problems/diameter-of-n-ary-treeDiameter of N-Ary TreeMedium75.4%37.5%
2065https://leetcode.com/problems/maximum-path-quality-of-a-graphMaximum Path Quality of a GraphHard61.6%25.0%
1438https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limitLongest Continuous Subarray With Absolute Diff Less Than or Equal to LimitMedium57.3%37.5%
416https://leetcode.com/problems/partition-equal-subset-sumPartition Equal Subset SumMedium49.2%25.0%
678https://leetcode.com/problems/valid-parenthesis-stringValid Parenthesis StringMedium39.8%25.0%
1245https://leetcode.com/problems/tree-diameterTree DiameterMedium61.2%25.0%
144https://leetcode.com/problems/binary-tree-preorder-traversalBinary Tree Preorder TraversalEasy75.1%25.0%
1463https://leetcode.com/problems/cherry-pickup-iiCherry Pickup IIHard72.3%25.0%
2434https://leetcode.com/problems/using-a-robot-to-print-the-lexicographically-smallest-stringUsing a Robot to Print the Lexicographically Smallest StringMedium62.5%25.0%
3170https://leetcode.com/problems/lexicographically-minimum-string-after-removing-starsLexicographically Minimum String After Removing StarsMedium51.0%25.0%
934https://leetcode.com/problems/shortest-bridgeShortest BridgeMedium59.3%25.0%
2062https://leetcode.com/problems/count-vowel-substrings-of-a-stringCount Vowel Substrings of a StringEasy72.8%25.0%
54https://leetcode.com/problems/spiral-matrixSpiral MatrixMedium56.1%25.0%
1839https://leetcode.com/problems/longest-substring-of-all-vowels-in-orderLongest Substring Of All Vowels in OrderMedium51.5%25.0%
207https://leetcode.com/problems/course-scheduleCourse ScheduleMedium50.8%37.5%
287https://leetcode.com/problems/find-the-duplicate-numberFind the Duplicate NumberMedium64.0%25.0%
3366https://leetcode.com/problems/minimum-array-sumMinimum Array SumMedium30.9%25.0%
2603https://leetcode.com/problems/collect-coins-in-a-treeCollect Coins in a TreeHard39.6%25.0%
105https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversalConstruct Binary Tree from Preorder and Inorder TraversalMedium68.3%25.0%
3035https://leetcode.com/problems/maximum-palindromes-after-operationsMaximum Palindromes After OperationsMedium45.6%25.0%