Open in app

Sign In

Write

Sign In

Pierre-Marie Poitevin
Pierre-Marie Poitevin

181 Followers

Home

About

Dec 14, 2022

Leetcode 2501: Longest Square Streak in an Array

In this Leetcode problem, we are given a list of ints, and we can rearrange them in any order we want to make a squares sequence such as [2,4,16]. The idea since we can rearrange the way we want is to first sort the array. That avoids the issue of…

Leetcode

2 min read

Leetcode

2 min read


Jul 13, 2022

What is wasted time?

Oftentimes I hear that “people are wasting their time watching TV” or that I am wasting time doing X or Y, but I wonder, what exactly is wasted time? And also what time isn’t wasted? I recognize that there are a lot of activities that I consider that my time…

Time Management

3 min read

What is wasted time?
What is wasted time?
Time Management

3 min read


Jan 21, 2022

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. 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
Cpp

2 min read


Jan 20, 2022

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 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
Java

3 min read


Jan 19, 2022

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: 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
Cpp

3 min read


Jan 18, 2022

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: 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
Java

3 min read


Jan 17, 2022

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 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
Java

2 min read


Jan 13, 2022

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 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
Algorithms

4 min read


Jan 13, 2022

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. 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

Java

1 min read


Jan 12, 2022

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 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
Java

4 min read

Pierre-Marie Poitevin

Pierre-Marie Poitevin

181 Followers

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

See all (17)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech