Open in app
Home
Notifications
Lists
Stories

Write
Pierre-Marie Poitevin
Pierre-Marie Poitevin

Home

Jan 21

Leetcode 2103: Rings and Rods

In this problem, we are given a list of rings going into rods, and we should return how many rods have rings with all the possible colors. — In this problem, we are given a list of rings going into rods, and we should return how many rods have rings with all the possible colors. There are n rings and each ring is either red, green, or blue. The rings are distributed across ten rods labeled from 0…

Cpp

2 min read

Leetcode 2103: Rings and Rods
Leetcode 2103: Rings and Rods

Jan 20

Leetcode 2141: Maximum Running Time of N Computers

In this problem, we try to figure out how long we can run n computers using a list of batteries. We have to use n different batteries at… — In this problem, we try to figure out how long we can run n computers using a list of batteries. We have to use n different batteries at any moment and switching them can be done any time (as long as it is a whole minute). …

Java

3 min read

Leetcode 2141: Maximum Running Time of N Computers
Leetcode 2141: Maximum Running Time of N Computers

Jan 19

Leetcode 2140: Solving Questions With Brainpower

In this problem, we are trying to find a testing strategy to optimize the number of points in a test giving the following rules: — In this problem, we are trying to find a testing strategy to optimize the number of points in a test giving the following rules: You are given a 0-indexed 2D integer array questions where questions[i] = [pointsi, brainpoweri]. The array describes the questions of an exam, where you have to…

Cpp

3 min read

Leetcode 2140: Solving Questions With Brainpower
Leetcode 2140: Solving Questions With Brainpower

Jan 18

Leetcode 2139: Minimum Moves to Reach Target Score

In this exercise, we are trying to obtain a target number using +1 and *2 operations, we also have a limited number of *2 operations: — In this exercise, we are trying to obtain a target number using +1 and *2 operations, we also have a limited number of *2 operations: You are playing a game with integers. You start with the integer 1 and you want to reach the integer target. In one move, you can…

Java

3 min read

Leetcode 2139: Minimum Moves to Reach Target Score
Leetcode 2139: Minimum Moves to Reach Target Score

Jan 17

Leetcode 2138: Divide a String Into Groups of Size k

In this problem, we divide a String into a list of substrings of size k. In the last String is not of size k, we complete the string with a… — In this problem, we divide a String into a list of substrings of size k. In the last String is not of size k, we complete the string with a fill character until the string is of size k. Example: s = "abcdef", k = 4, fill = 'x' Return…

Java

2 min read

Leetcode 2138: Divide a String Into Groups of Size k
Leetcode 2138: Divide a String Into Groups of Size k

Jan 13

Leetcode 2115: Find All Possible Recipes from Given Supplies

In this problem, we are trying to figure the list of recipes that we can make out of a list of ingredients in unlimited quantity. The… — In this problem, we are trying to figure the list of recipes that we can make out of a list of ingredients in unlimited quantity. The difficulty comes from the fact that in the list of ingredients necessary for each recipe, there can be another recipe itself. You have information…

Algorithms

4 min read

Leetcode 2115: Find All Possible Recipes from Given Supplies
Leetcode 2115: Find All Possible Recipes from Given Supplies

Jan 13

Leetcode 2108: Find First Palindromic String in the Array

In this problem, we want to find the first String that is a palindrome in an array of Strings. — In this problem, we want to find the first String that is a palindrome in an array of Strings. Given an array of strings words, return the first palindromic string in the array. If there is no such string, return an empty string "". A string is palindromic if it…

Java

1 min read


Jan 12

Leetcode 2135: Count Words Obtained After Adding a Letter

In this Leetcode problem, we are asked to transform some words from an array of words to target words. Any word from the initial array can… — In this Leetcode problem, we are asked to transform some words from an array of words to target words. Any word from the initial array can be used to be transformed in a target word using a specific transformation rule. You are given two 0-indexed arrays of strings startWords and…

Java

4 min read

Leetcode 2135: Count Words Obtained After Adding a Letter
Leetcode 2135: Count Words Obtained After Adding a Letter

Jan 10

Leetcode 2134: Minimum Swaps to Group All 1’s Together II

In this exercise, we try to put all the ones together in a circular array by swapping elements. We need to find the minimum number of swaps… — In this exercise, we try to put all the ones together in a circular array by swapping elements. We need to find the minimum number of swaps needed: A swap is defined as taking two distinct positions in an array and swapping the values in them. A circular array is defined…

Java

2 min read

Leetcode 2134: Minimum Swaps to Group All 1’s Together II
Leetcode 2134: Minimum Swaps to Group All 1’s Together II

Jan 10

Leetcode 2133: Check if Every Row and Column Contains All Numbers

In this problem, we are trying to find out in a 2-dimension if every number from 1 to n is in each row and each column: — In this problem, we are trying to find out in a 2-dimension if every number from 1 to n is in each row and each column: An n x n matrix is valid if every row and every column contains all the integers from 1 to n (inclusive). Given an n…

Java

2 min read

Leetcode 2133: Check if Every Row and Column Contains All Numbers
Leetcode 2133: Check if Every Row and Column Contains All Numbers
Pierre-Marie Poitevin

Pierre-Marie Poitevin

Likes to code and to learn.

Following
  • Douglas Rushkoff

    Douglas Rushkoff

  • Concoda

    Concoda

  • Ming Hu

    Ming Hu

  • The Economist

    The Economist

  • Karthikeyan Ramasamy

    Karthikeyan Ramasamy

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable