This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Write a program to "factorize" the extremities of two ASCII strings {@code str1} and {@code str2}. | |
| * <p> | |
| * Your must return a single string, initially made from the concatenation of two given strings. | |
| * The longest substrings that is common between the end of the first string and the beginning | |
| * of the second one must be factorized (written only once). | |
| * <p> | |
| * You must decide the concatenation order {@code str1 + str2} or {@code str2 + str1} so that | |
| * you get the best factorization. | |
| * <p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.postgresql.PGNotification; | |
| import org.postgresql.ds.PGSimpleDataSource; | |
| import org.postgresql.jdbc.PgConnection; | |
| import java.sql.SQLException; | |
| import java.util.concurrent.ScheduledExecutorService; | |
| import java.util.concurrent.ScheduledFuture; | |
| import java.util.concurrent.TimeUnit; | |
| import static java.lang.Thread.ofVirtual; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Set; | |
| import java.util.TreeMap; | |
| import java.util.TreeSet; | |
| /** | |
| * You collected data about persons from multiple sources. You would like to consolidate them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| /** | |
| * In the echanted land of Evenaria, | |
| * an elf named Codelia was searching for the mystical Even Stones, which maintained balance and harmony. | |
| * One day, she discovered an ancient scroll with a list of numbers representing their locations. | |
| * However, the scroll was damaged and the numbers looked scrambled. | |
| * <p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| /** | |
| * Your company builds radioactivity sensors. | |
| * You are responsible for their verification process. | |
| * You know that when a sensor is failing, the value it outputs have big variations on short time periods. | |
| * <p> | |
| * The input parameter {@code values}, a list of decimal numbers, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayDeque; | |
| import java.util.ArrayList; | |
| import java.util.Deque; | |
| import java.util.HashSet; | |
| import java.util.List; | |
| import java.util.Objects; | |
| import java.util.Set; | |
| import static java.util.Arrays.asList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * <h2>Objectif</h2> | |
| * <p> | |
| * Le javanais, aussi appelé langue de feu, est un procédé de codage argotique qui fut utilisé | |
| * à la fin du 19ème siècle par certains malfaiteurs pour crypter leur conversations. Écrivez un programme | |
| * retournant la traduction en javanais d'une phrase. | |
| * <p> | |
| * <h3>Fonctionnement</h3> | |
| * <p> | |
| * <ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.List; | |
| import java.util.stream.IntStream; | |
| import static java.util.Arrays.asList; | |
| /** | |
| * Écrivez le corps de la méthode {@link #isOnEvenPosition(List, int)}. | |
| * <p> | |
| * La méthode doit renvoyer le booléen {@code true} si {@code value} est contenu dans la liste | |
| * {@code numbers} à un index pair (les index sont comptés à partir de 0). {@code value} peut |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.security.SecureRandom; | |
| import java.time.Duration; | |
| import java.time.Instant; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Random; | |
| import static java.lang.System.nanoTime; | |
| import static java.util.Arrays.asList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.HashSet; | |
| import java.util.List; | |
| import java.util.Set; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| /** | |
| * <b>Unique Array</b> | |
| * <p> |
NewerOlder