I don't know if I've been more hardworking after returning from holidays, or it so happened that the weeks of studying bits and pieces finally came together last week... I've finished some milestones ...
2818. Apply Operations to Maximize ScoreDifficulty: HardTopics: Array, Math, Stack, Greedy, Sorting, Monotonic Stack, Number TheoryYou are given an array nums of n positive integers and an integer k.I...
763. Partition LabelsDifficulty: MediumTopics: Hash Table, Two Pointers, String, GreedyYou are given a string s. We want to partition the string into as many parts as possible so that each letter appe...
2551. Put Marbles in BagsDifficulty: HardTopics: Array, Greedy, Sorting, Heap (Priority Queue)You have k bags. You are given a 0-indexed integer array weights where weights[i] is the weight of the ith...
Technical Interviews are a key part of the hiring process. They’re designed to assess our problem-solving ability, technical knowledge, and coding skills. It involves two-way communication. It's imp...
2140. Solving Questions With BrainpowerDifficulty: MediumTopics: Array, Dynamic ProgrammingYou are given a 0-indexed 2D integer array questions where questions[i] = [pointsi, brainpoweri].The array de...
Top Interview 150The Group Anagrams problem involves grouping words that are anagrams of each other. Let’s solve LeetCode 49: Group Anagrams step by step.
🚀 Problem Description
Given an a...
2873. Maximum Value of an Ordered Triplet IDifficulty: EasyTopics: ArrayYou are given a 0-indexed integer array nums.Return the maximum value over all triplets of indices (i, j, k) such that i < j ...
2874. Maximum Value of an Ordered Triplet IIDifficulty: MediumTopics: ArrayYou are given a 0-indexed integer array nums.Return the maximum value over all triplets of indices (i, j, k) such that i <...
Approach
Find the leftPrev Node**
Create a dummy node to handle edge cases (like when left = 1).
Move leftPrev to the node before the left position.
Reverse the Sublist
Use the standard linke...