From e73220e4d60e7b33ec2572ebc90a5f101a735796 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment?=
Date: Mon, 22 Apr 2019 11:45:15 +0100
Subject: [PATCH 01/71] Create call-graphql.go
---
examples/call-graphql.go | 93 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
create mode 100644 examples/call-graphql.go
diff --git a/examples/call-graphql.go b/examples/call-graphql.go
new file mode 100644
index 00000000..ab72c141
--- /dev/null
+++ b/examples/call-graphql.go
@@ -0,0 +1,93 @@
+package main
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "net/http"
+ "os"
+)
+
+func jsonPrettyPrint(in []byte) string {
+ var out bytes.Buffer
+ err := json.Indent(&out, in, "", " ")
+ if err != nil {
+ return string(in)
+ }
+ return out.String()
+}
+
+var HASURA_GRAPHQL_ADDRESS = os.Getenv("HASURA_GRAPHQL_ADDRESS")
+var HASURA_GRAPHQL_ADMIN_SECRET = os.Getenv("HASURA_GRAPHQL_ADMIN_SECRET")
+
+type GraphqlQuery struct {
+ Data interface{}
+}
+
+var client = &http.Client{Transport: http.DefaultTransport}
+
+func hasura(query string, variables interface{}, data interface{}) (err error) {
+ variablesBytes, err := json.Marshal(variables)
+ if err != nil {
+ return
+ }
+
+ v := string(variablesBytes)
+ requestBody := []byte(`{"query":"` + query + `","variables":` + v + `}`)
+ requestBytes := bytes.NewBuffer(requestBody)
+ req, err := http.NewRequest("POST", HASURA_GRAPHQL_ADDRESS, requestBytes)
+ if err != nil {
+ return
+ }
+
+ req.Header.Add("X-Hasura-Admin-Secret", HASURA_GRAPHQL_ADMIN_SECRET)
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return
+ }
+
+ b, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return
+ }
+
+ // loggin the answer for debugging purposes
+ fmt.Println(jsonPrettyPrint(b))
+
+ if resp.StatusCode < 200 || resp.StatusCode > 299 {
+ return errors.New(http.StatusText(resp.StatusCode))
+ }
+
+ gqlQuery := GraphqlQuery{Data: data}
+ err = json.Unmarshal(b, &gqlQuery)
+ if err != nil {
+ return
+ }
+ return
+}
+
+type User struct {
+ GithubLogin string
+}
+
+const userQuery = `
+query {
+ user {
+ githubLogin
+ }
+}`
+
+func getUsers() (users []User, err error) {
+ var data map[string][]User
+ err = hasura(userQuery, nil, &data)
+ return data["user"], err
+}
+
+func main() {
+ fmt.Println(getUsers())
+}
+
+// HASURA_GRAPHQL_ADMIN_SECRET=VERYVERYSECRET HASURA_GRAPHQL_ADDRESS=http://localhost/graphql-engine/v1alpha1/graphql go run call-graphql.go
From 1142d3429126759a8eacd4e7489b6374344784bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment?=
Date: Mon, 22 Apr 2019 11:54:54 +0100
Subject: [PATCH 02/71] Remove supefluous check
---
examples/call-graphql.go | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/examples/call-graphql.go b/examples/call-graphql.go
index ab72c141..9ef6af54 100644
--- a/examples/call-graphql.go
+++ b/examples/call-graphql.go
@@ -61,12 +61,7 @@ func hasura(query string, variables interface{}, data interface{}) (err error) {
return errors.New(http.StatusText(resp.StatusCode))
}
- gqlQuery := GraphqlQuery{Data: data}
- err = json.Unmarshal(b, &gqlQuery)
- if err != nil {
- return
- }
- return
+ return json.Unmarshal(b, &GraphqlQuery{Data: data})
}
type User struct {
From fdba51f5ebcd025a04bebde77c1ef0f47603f8e2 Mon Sep 17 00:00:00 2001
From: Louise Foussat
Date: Mon, 22 Apr 2019 14:51:05 +0100
Subject: [PATCH 03/71] create first doc for step creation in
signup/administrative part
---
doc/create-steps.md | 152 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 152 insertions(+)
create mode 100644 doc/create-steps.md
diff --git a/doc/create-steps.md b/doc/create-steps.md
new file mode 100644
index 00000000..0f583973
--- /dev/null
+++ b/doc/create-steps.md
@@ -0,0 +1,152 @@
+# How to create onboarding steps
+
+## Usage
+This documentation explains how to create steps in your onboarding. 2 kind of steps can be generated in a modular way :
+* forms
+* documents to sign
+
+These steps are used for the "sign up" phase, and for the administrative part of the onboarding.
+
+## Description & examples
+The sign up phase and the administration part of the onboarding are related to major objects in the admin. all the steps for each of these two sections are children of these two big objects, that you can create, update, or delete, and order as you wish.
+The objects contained in the sign up phase are object of type "sign up".
+The objects contained in the administration part of the onboarding phase are object of type "onboarding".
+
+### Relate a step to a major object
+Every step is related to the major object you want to costum as a child. To create a child, you must :
+1. Create a new object for your step in the admin (in Admin > "Add new object")
+ * The title of your object will be the title displayed for the step you're creating. Use a intellegible title for your user.
+ * This object must have the same type as your major object ("signup" for the sign up phase, "onboarding" for the administration part of the onboarding)
+2. Add this new object as a child of your major object
+ 1. Edit the major object
+ 2. Go to "Children" > "Add a child"
+ 3. Set up the new child:
+ * Enter its name in the input "Add a child name"
+ * Select you child in the select input
+ * Click on "ADD"
+
+### Settings for a form step
+In the child object you've created, 2 attributes must be filled:
+1. subtype
+2. form
+
+To set up the child object you've created with these elements :
+1. Edit you child object
+2. Go to "Object attributes"
+3. Add the attributes :
+ 1. Add a new key "subtype" of type `` with the value 'onb-adm-form'
+ 2. Add a new key "form" of type `
-## The Commandements _(read them)_
+### The Commandements _(read them)_
- Le numérique est ta passion.
@@ -100,7 +100,7 @@ A few basic principles to follow
- Si tu t’interroges ou ne comprends pas nos choix pédagogiques, demande nous. On ne fait généralement rien au hasard.
-## Required
+### Required
You [clone](http://lmgtfy.com/?q=git+clone) your [fork](http://lmgtfy.com/?q=github+fork) of this [repository](http://lmgtfy.com/?q=git+repository)
and in it, you must create a file named `turn_in` () in which you write EXACTLY the following sentence ending by a line break.
@@ -109,6 +109,6 @@ and in it, you must create a file named `turn_in` () in which you write EXACTLY
-## Submiting your solution
+### Submiting your solution
Your work should be commited and pushed in the master branch of your own fork of this repository.
diff --git a/subjects/compare.en.md b/subjects/compare.en.md
index e40ff803..9133ea0c 100644
--- a/subjects/compare.en.md
+++ b/subjects/compare.en.md
@@ -1,10 +1,10 @@
-# compare
+## compare
-## Instructions
+### Instructions
Write a function that behaves like the [`Compare`](https://golang.org/pkg/strings/#Compare) function.
-## Expected function
+### Expected function
```go
func Compare(a, b string) int {
@@ -12,7 +12,7 @@ func Compare(a, b string) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/compare.fr.md b/subjects/compare.fr.md
index a5fe8d4f..9f27f0c0 100644
--- a/subjects/compare.fr.md
+++ b/subjects/compare.fr.md
@@ -1,10 +1,10 @@
-# compare
+## compare
-## Instructions
+### Instructions
Écrire une fonction qui se comporte comme la fonction [`Compare`](https://golang.org/pkg/strings/#Compare).
-## Fonction attendue
+### Fonction attendue
```go
func Compare(a, b string) int {
@@ -12,7 +12,7 @@ func Compare(a, b string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/concat.en.md b/subjects/concat.en.md
index 31e99ceb..c5b4644c 100644
--- a/subjects/concat.en.md
+++ b/subjects/concat.en.md
@@ -1,10 +1,10 @@
-# concat
+## concat
-## Instructions
+### Instructions
Write a function that returns the concatenation of two `string` passed in arguments.
-## Expected function
+### Expected function
```go
func Concat(str1 string, str2 string) string {
@@ -12,7 +12,7 @@ func Concat(str1 string, str2 string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/concat.fr.md b/subjects/concat.fr.md
index fcacfdfa..20f7feeb 100644
--- a/subjects/concat.fr.md
+++ b/subjects/concat.fr.md
@@ -1,10 +1,10 @@
-# concat
+## concat
-## Instructions
+### Instructions
Écrire une fonction qui retourne la concaténation de deux `string` passées en paramètres.
-## Fonction attendue
+### Fonction attendue
```go
func Concat(str1 string, str2 string) string {
@@ -12,7 +12,7 @@ func Concat(str1 string, str2 string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/concatparams.en.md b/subjects/concatparams.en.md
index cc996d63..b9425ecd 100644
--- a/subjects/concatparams.en.md
+++ b/subjects/concatparams.en.md
@@ -1,19 +1,19 @@
-# concatparams
+## concatparams
-## Instructions
+### Instructions
Write a function that takes the arguments reveived in parameters and returns them as a `string`.
The arguments must be **separated** by a `\n`.
-## Expected function
+### Expected function
```go
func ConcatParams(args []string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/concatparams.fr.md b/subjects/concatparams.fr.md
index a9584ede..b5e5084c 100644
--- a/subjects/concatparams.fr.md
+++ b/subjects/concatparams.fr.md
@@ -1,19 +1,19 @@
-# concatparams
+## concatparams
-## Instructions
+### Instructions
Écrire une fonction qui prend les arguments en paramètres et les retournes dans une `string`.
Les arguments doivent être **séparés** par un `\n`.
-## Fonction attendue
+### Fonction attendue
```go
func ConcatParams(args []string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/convertbase.en.md b/subjects/convertbase.en.md
index f82550b3..760e3453 100644
--- a/subjects/convertbase.en.md
+++ b/subjects/convertbase.en.md
@@ -1,6 +1,6 @@
-# convertbase
+## convertbase
-## Instructions
+### Instructions
Write a function that returns the convertion of a `string` number from one `string` baseFrom to one `string` baseTo.
@@ -8,14 +8,14 @@ Only valid bases will be tested.
Negative numbers will not be tested.
-## Expected function
+### Expected function
```go
func ConvertBase(nbr, baseFrom, baseTo string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/convertbase.fr.md b/subjects/convertbase.fr.md
index 45da7f30..76899372 100644
--- a/subjects/convertbase.fr.md
+++ b/subjects/convertbase.fr.md
@@ -1,6 +1,6 @@
-# convertbase
+## convertbase
-## Instructions
+### Instructions
Écrire une fonction qui retourne la convertion d'un nombre `string` d'une baseFrom `string` à une baseTo `string`.
@@ -8,14 +8,14 @@ Seules des bases valides seront testées.
Les nombres négatifs ne seront pas testés.
-## Fonction attendue
+### Fonction attendue
```go
func ConvertBase(nbr, baseFrom, baseTo string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/countif.en.md b/subjects/countif.en.md
index 87105d0b..234987de 100644
--- a/subjects/countif.en.md
+++ b/subjects/countif.en.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Write a function `CountIf` that returns the number of elements of a `string` array for which the `f` function returns `true`.
-## Expected function
+### Expected function
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/countif.fr.md b/subjects/countif.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/countif.fr.md
+++ b/subjects/countif.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/divmod.en.md b/subjects/divmod.en.md
index 535108f8..1deb4ce1 100755
--- a/subjects/divmod.en.md
+++ b/subjects/divmod.en.md
@@ -1,10 +1,10 @@
-# divmod
+## divmod
-## Instructions
+### Instructions
- Write a function that will be formatted as below.
-## Expected function
+### Expected function
```go
func DivMod(a int, b int, div *int, mod *int) {
@@ -16,7 +16,7 @@ func DivMod(a int, b int, div *int, mod *int) {
- The result of this division will be stored in the int pointed by **div**.
- The remainder of this division will be stored in the int pointed by **mod**.
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/divmod.fr.md b/subjects/divmod.fr.md
index 90b9c353..5af68c2f 100755
--- a/subjects/divmod.fr.md
+++ b/subjects/divmod.fr.md
@@ -1,10 +1,10 @@
-# divmod
+## divmod
-## Instructions
+### Instructions
- Écrire une fonction qui aura le format ci-dessous.
-## Fonction attendue
+### Fonction attendue
```go
func DivMod(a int, b int, div *int, mod *int) {
@@ -16,7 +16,7 @@ func DivMod(a int, b int, div *int, mod *int) {
- Le résultat de la division sera stocké dans l'int pointé par **div**.
- Le reste de cette division sera stocké dans l'int pointé par **mod**.
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/doop.en.md b/subjects/doop.en.md
index f870fced..21c48d3d 100644
--- a/subjects/doop.en.md
+++ b/subjects/doop.en.md
@@ -1,6 +1,6 @@
-# doop
+## doop
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that is called `doop`.
@@ -16,7 +16,7 @@ In case of an invalid number of arguments the program prints nothing.
`fmt.Print` is authorized.
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/test$ go build doop.go
diff --git a/subjects/doop.fr.md b/subjects/doop.fr.md
index 0d11ae53..8acbf79e 100644
--- a/subjects/doop.fr.md
+++ b/subjects/doop.fr.md
@@ -1,6 +1,6 @@
-# doop
+## doop
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui s'apelle `doop`.
@@ -16,7 +16,7 @@ En cas de nombre invalide d'arguments le programme affiche rien.
`fmt.Print` est autorisé.
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/test$ go build doop.go
diff --git a/subjects/eightqueens.en.md b/subjects/eightqueens.en.md
index b90d7946..9964bfdd 100644
--- a/subjects/eightqueens.en.md
+++ b/subjects/eightqueens.en.md
@@ -1,6 +1,6 @@
-# eightqueens
+## eightqueens
-## Intructions
+### Intructions
Write a function that prints the solutions to the [eight queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle).
@@ -22,7 +22,7 @@ The index of the placement of a queen starts at 1.
It reads from left to right and each digit is the position for each column.
The solutions will be printed in ascending order.
-## Expected function
+### Expected function
```go
package main
diff --git a/subjects/eightqueens.fr.md b/subjects/eightqueens.fr.md
index bd418b21..927baa65 100644
--- a/subjects/eightqueens.fr.md
+++ b/subjects/eightqueens.fr.md
@@ -1,6 +1,6 @@
-# eightqueens
+## eightqueens
-## Intructions
+### Intructions
Écrire une [fonction](TODO-LINK) qui affiche toutes les solutions du [problème des huit dames](https://en.wikipedia.org/wiki/Eight_queens_puzzle).
@@ -22,7 +22,7 @@ L'index du placement d'une reine commence à 1.
Elle se lit de gauche à droite et chaque chiffre est la position pour chacune des colonnes.
Les solutions seront affichées dans l'ordre croissant.
-## Fonction attendue
+### Fonction attendue
```go
package main
diff --git a/subjects/fibonacci.en.md b/subjects/fibonacci.en.md
index abc673da..47ad3862 100644
--- a/subjects/fibonacci.en.md
+++ b/subjects/fibonacci.en.md
@@ -1,6 +1,6 @@
-# fibonacci
+## fibonacci
-## Intructions
+### Intructions
Write an **recursive** function that returns the value of fibonacci sequence matching the index passed as parameter.
@@ -12,7 +12,7 @@ A negative index will return `-1`.
`for` is **forbidden** for this exercise.
-## Expected function
+### Expected function
```go
package main
@@ -22,7 +22,7 @@ func Fibonacci(int index) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/fibonacci.fr.md b/subjects/fibonacci.fr.md
index d0b949f9..c6b5b0a2 100644
--- a/subjects/fibonacci.fr.md
+++ b/subjects/fibonacci.fr.md
@@ -1,6 +1,6 @@
-# fibonacci
+## fibonacci
-## Intructions
+### Intructions
Écrire une fonction **récursive** qui renvoie la valeur de la suite de fibonacci correspondant à l'index passé en paramètre.
@@ -12,7 +12,7 @@ Un index négatif renvoie `-1`.
`for` est **interdit** pour cet exercice.
-## Fonction attendue
+### Fonction attendue
```go
package main
@@ -22,7 +22,7 @@ func Fibonacci(int index) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel `main.go` :
diff --git a/subjects/findnextprime.en.md b/subjects/findnextprime.en.md
index a612340c..5743622f 100644
--- a/subjects/findnextprime.en.md
+++ b/subjects/findnextprime.en.md
@@ -1,10 +1,10 @@
-# findnextprime
+## findnextprime
-## Intructions
+### Intructions
Write a function that returns the first prime number that is equal or superior to the `int` passed as parameter.
-## Expected function
+### Expected function
```go
func FindNextPrime(int nb) int {
@@ -12,7 +12,7 @@ func FindNextPrime(int nb) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/findnextprime.fr.md b/subjects/findnextprime.fr.md
index 073307bd..c1761842 100644
--- a/subjects/findnextprime.fr.md
+++ b/subjects/findnextprime.fr.md
@@ -1,10 +1,10 @@
-# findnextprime
+## findnextprime
-## Intructions
+### Intructions
Écrire une fonction qui renvoie le premier nombre premier qui est égal ou supérieur à l'`int` passé en paramètre.
-## Fonction attendue
+### Fonction attendue
```go
func FindNextPrime(int nb) int {
@@ -12,7 +12,7 @@ func FindNextPrime(int nb) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/firebase-demo.en.md b/subjects/firebase-demo.en.md
index 9d1765ed..e68fc092 100644
--- a/subjects/firebase-demo.en.md
+++ b/subjects/firebase-demo.en.md
@@ -1 +1 @@
-# firebase-demo
+## firebase-demo
diff --git a/subjects/firstrune.en.md b/subjects/firstrune.en.md
index be9c9a7c..f257da3d 100644
--- a/subjects/firstrune.en.md
+++ b/subjects/firstrune.en.md
@@ -1,10 +1,10 @@
-# firstrune
+## firstrune
-## Instructions
+### Instructions
Write a function that returns the first `rune` of a `string`.
-## Expected function
+### Expected function
```go
func FirstRune(s string) rune {
@@ -12,7 +12,7 @@ func FirstRune(s string) rune {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/firstrune.fr.md b/subjects/firstrune.fr.md
index 1ed1a722..932cbe45 100644
--- a/subjects/firstrune.fr.md
+++ b/subjects/firstrune.fr.md
@@ -1,10 +1,10 @@
-# firstrune
+## firstrune
-## Instructions
+### Instructions
Écrire une fonction qui retourne la première `rune` d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func FirstRune(s string) rune {
@@ -12,7 +12,7 @@ func FirstRune(s string) rune {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/foreach.en.md b/subjects/foreach.en.md
index b88c4b5f..d21c6ca0 100644
--- a/subjects/foreach.en.md
+++ b/subjects/foreach.en.md
@@ -1,17 +1,17 @@
-# foreach
+## foreach
-## Instructions
+### Instructions
Write a function `ForEach` that, for an `int` array, applies a function on each elements of that array.
-## Expected function
+### Expected function
```go
func ForEach(f func(int), arr []int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/foreach.fr.md b/subjects/foreach.fr.md
index e143d7cf..18ac85ac 100644
--- a/subjects/foreach.fr.md
+++ b/subjects/foreach.fr.md
@@ -1,17 +1,17 @@
-# foreach
+## foreach
-## Instructions
+### Instructions
Écrire une fonction `ForEach` qui, pour un tableau d'`int`, applique une fonction sur chaque éléments de ce tableau.
-## Fonction attendue
+### Fonction attendue
```go
func ForEach(f func(int), arr []int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/functions.en.md b/subjects/functions.en.md
index 4675bc02..c5ba5ff2 100644
--- a/subjects/functions.en.md
+++ b/subjects/functions.en.md
@@ -1,3 +1,3 @@
-# functions
+## functions
This repository aggregate every functions of the Zone 01 organization
diff --git a/subjects/get-ready.en.md b/subjects/get-ready.en.md
index df26156b..8086b1ce 100644
--- a/subjects/get-ready.en.md
+++ b/subjects/get-ready.en.md
@@ -1,6 +1,6 @@
-# get-ready
+## get-ready
-## Instructions
+### Instructions
Subscribe to [Discord](Discord-invite-link) and send a private message to the bot (TODO: find a name for the bot).
diff --git a/subjects/go-say-hello.en.md b/subjects/go-say-hello.en.md
index 2fba5366..d9242b47 100644
--- a/subjects/go-say-hello.en.md
+++ b/subjects/go-say-hello.en.md
@@ -1,10 +1,10 @@
-# go-say-hello
+## go-say-hello
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that says `hello` to your GitHub username.
-## Usage
+### Usage
Where `{username}` is your GitHub username:
diff --git a/subjects/go-say-hello.fr.md b/subjects/go-say-hello.fr.md
index 01a9cc9c..5aab8f02 100644
--- a/subjects/go-say-hello.fr.md
+++ b/subjects/go-say-hello.fr.md
@@ -1,10 +1,10 @@
-# gosayhello
+## gosayhello
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui vous dis `hello` à votre GitHub username.
-## Utilisation
+### Utilisation
Ici `{username}` est votre GitHub username:
diff --git a/subjects/index.en.md b/subjects/index.en.md
index 5c7c46c6..4210f76d 100644
--- a/subjects/index.en.md
+++ b/subjects/index.en.md
@@ -1,10 +1,10 @@
-# index
+## index
-## Instructions
+### Instructions
Write a function that behaves like the [`Index`](https://golang.org/pkg/strings/#Index) function.
-## Expected function
+### Expected function
```go
func Index(s string, toFind string) int {
@@ -12,7 +12,7 @@ func Index(s string, toFind string) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/index.fr.md b/subjects/index.fr.md
index d8770b3d..fa256638 100644
--- a/subjects/index.fr.md
+++ b/subjects/index.fr.md
@@ -1,10 +1,10 @@
-# index
+## index
-## Instructions
+### Instructions
Écrire une fonction qui se comporte comme la fonction [`Index`](https://golang.org/pkg/strings/#Index).
-## Fonction attendue
+### Fonction attendue
```go
func Index(s string, toFind string) int {
@@ -12,7 +12,7 @@ func Index(s string, toFind string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isalpha.en.md b/subjects/isalpha.en.md
index 89be87ff..92cc667f 100644
--- a/subjects/isalpha.en.md
+++ b/subjects/isalpha.en.md
@@ -1,10 +1,10 @@
-# isalpha
+## isalpha
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains alphanumerical characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
func IsAlpha(str string) bool {
@@ -12,7 +12,7 @@ func IsAlpha(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isalpha.fr.md b/subjects/isalpha.fr.md
index 7a55229b..0bd3b2ce 100644
--- a/subjects/isalpha.fr.md
+++ b/subjects/isalpha.fr.md
@@ -1,10 +1,10 @@
-# isalpha
+## isalpha
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères alphanumériques, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
func IsAlpha(str string) bool {
@@ -12,7 +12,7 @@ func IsAlpha(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/islower.en.md b/subjects/islower.en.md
index 6cb7b82d..71d43576 100644
--- a/subjects/islower.en.md
+++ b/subjects/islower.en.md
@@ -1,10 +1,10 @@
-# islower
+## islower
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains lowercase characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
func IsLower(str string) bool {
@@ -12,7 +12,7 @@ func IsLower(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/islower.fr.md b/subjects/islower.fr.md
index c1987fb1..47b13436 100644
--- a/subjects/islower.fr.md
+++ b/subjects/islower.fr.md
@@ -1,10 +1,10 @@
-# islower
+## islower
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères minuscules, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
func IsLower(str string) bool {
@@ -12,7 +12,7 @@ func IsLower(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isnegative.en.md b/subjects/isnegative.en.md
index bf0f34bf..faa8b57c 100644
--- a/subjects/isnegative.en.md
+++ b/subjects/isnegative.en.md
@@ -1,10 +1,10 @@
-# isnegative
+## isnegative
-## Instructions
+### Instructions
Write a [function](TODO-LINK) that prints `'T'` (true) on a single line if the `int` passed as parameter is negative, otherwise it prints `'F'` (false).
-## Expected function
+### Expected function
```go
func IsNegative(nb int) {
@@ -12,7 +12,7 @@ func IsNegative(nb int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isnegative.fr.md b/subjects/isnegative.fr.md
index fa2f3739..9804e33b 100644
--- a/subjects/isnegative.fr.md
+++ b/subjects/isnegative.fr.md
@@ -1,10 +1,10 @@
-# isnegative
+## isnegative
-## Instructions
+### Instructions
Écrire une [fonction](TODO-LINK) qui affiche `'T'` (true) sur une seule ligne si l'`int` passé en paramètre est négatif, sinon elle affiche `'F'` (false).
-## Fonction attendue
+### Fonction attendue
```go
func IsNegative(nb int) {
@@ -12,7 +12,7 @@ func IsNegative(nb int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isnumeric.en.md b/subjects/isnumeric.en.md
index 0d877d6d..550dced3 100644
--- a/subjects/isnumeric.en.md
+++ b/subjects/isnumeric.en.md
@@ -1,10 +1,10 @@
-# isnumeric
+## isnumeric
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains numerical characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
func IsNumeric(str string) bool {
@@ -12,7 +12,7 @@ func IsNumeric(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isnumeric.fr.md b/subjects/isnumeric.fr.md
index 624f58e0..adaec9ba 100644
--- a/subjects/isnumeric.fr.md
+++ b/subjects/isnumeric.fr.md
@@ -1,10 +1,10 @@
-# isnumeric
+## isnumeric
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères numériques, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
func IsNumeric(str string) bool {
@@ -12,7 +12,7 @@ func IsNumeric(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isprime.en.md b/subjects/isprime.en.md
index 371eca69..b5a2f91f 100644
--- a/subjects/isprime.en.md
+++ b/subjects/isprime.en.md
@@ -1,10 +1,10 @@
-# isprime
+## isprime
-## Intructions
+### Intructions
Write a function that returns `true` if the `int` passed as parameter is a prime number. Otherwise it returns `false`.
-## Expected function
+### Expected function
```go
func IsPrime(int nb) bool {
@@ -12,7 +12,7 @@ func IsPrime(int nb) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isprime.fr.md b/subjects/isprime.fr.md
index 55b63472..be345292 100644
--- a/subjects/isprime.fr.md
+++ b/subjects/isprime.fr.md
@@ -1,10 +1,10 @@
-# isprime
+## isprime
-## Intructions
+### Intructions
Écrire une fonction qui renvoie `true` si l'`int` passé en paramètre est un nombre premier. Autrement elle renvoie `false`.
-## Fonction attendue
+### Fonction attendue
```go
func IsPrime(int nb) bool {
@@ -12,7 +12,7 @@ func IsPrime(int nb) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/isprintable.en.md b/subjects/isprintable.en.md
index 55e7ab19..04c131f8 100644
--- a/subjects/isprintable.en.md
+++ b/subjects/isprintable.en.md
@@ -1,10 +1,10 @@
-# isprintable
+## isprintable
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains printable characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
package main
@@ -13,7 +13,7 @@ func IsPrintable(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isprintable.fr.md b/subjects/isprintable.fr.md
index 3822a20b..9927cbee 100644
--- a/subjects/isprintable.fr.md
+++ b/subjects/isprintable.fr.md
@@ -1,10 +1,10 @@
-# isprintable
+## isprintable
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
package main
@@ -13,7 +13,7 @@ func IsPrintable(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/issorted.en.md b/subjects/issorted.en.md
index 89683314..5970788a 100644
--- a/subjects/issorted.en.md
+++ b/subjects/issorted.en.md
@@ -1,6 +1,6 @@
-# issorted
+## issorted
-## Instructions
+### Instructions
Write a function `IsSorted` that returns `true` if the slice of `int` is sorted, and that returns `false` otherwise.
@@ -9,14 +9,14 @@ it returns `0` if they are equal and it returns a negative `int` otherwise.
To do your testing you have to write your own `f` function.
-## Expected function
+### Expected function
```go
func IsSorted(f func(a, b int) int, tab []int) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function (without `f`):
diff --git a/subjects/issorted.fr.md b/subjects/issorted.fr.md
index 28241082..6c6471c2 100644
--- a/subjects/issorted.fr.md
+++ b/subjects/issorted.fr.md
@@ -1,6 +1,6 @@
-# issorted
+## issorted
-## Instructions
+### Instructions
Écrire une fonction `IsSorted` qui retourne `true` si la slice d'`int` est triée, et qui retourne `false` autrement.
@@ -8,14 +8,14 @@ La fonction passée en paramètre retourne un `int` positive si `a` (le premier
Pour faire vos tests, vous devez coder votre propre fonction `f`.
-## Fonction attendue
+### Fonction attendue
```go
func IsSorted(f func(a, b int) int, tab []int) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction (sans `f`) :
diff --git a/subjects/isupper.en.md b/subjects/isupper.en.md
index 20afc831..66980bec 100644
--- a/subjects/isupper.en.md
+++ b/subjects/isupper.en.md
@@ -1,10 +1,10 @@
-# isupper
+## isupper
-## Instructions
+### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains uppercase characters, and that returns `false` otherwise.
-## Expected function
+### Expected function
```go
func IsUpper(str string) bool {
@@ -12,7 +12,7 @@ func IsUpper(str string) bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/isupper.fr.md b/subjects/isupper.fr.md
index c10d8129..9b991785 100644
--- a/subjects/isupper.fr.md
+++ b/subjects/isupper.fr.md
@@ -1,10 +1,10 @@
-# isupper
+## isupper
-## Instructions
+### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
-## Fonction attendue
+### Fonction attendue
```go
func IsUpper(str string) bool {
@@ -12,7 +12,7 @@ func IsUpper(str string) bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/iterativefactorial.en.md b/subjects/iterativefactorial.en.md
index 45a5cf5a..2e882e55 100644
--- a/subjects/iterativefactorial.en.md
+++ b/subjects/iterativefactorial.en.md
@@ -1,12 +1,12 @@
-# iterativefactorial
+## iterativefactorial
-## Intructions
+### Intructions
Write an **iterative** function that returns the factorial of the `int` passed as parameter.
Errors (non possible values or overflows) will return `0`.
-## Expected function
+### Expected function
```go
func IterativeFactorial(int nb) int {
@@ -14,7 +14,7 @@ func IterativeFactorial(int nb) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/iterativefactorial.fr.md b/subjects/iterativefactorial.fr.md
index 9f7f91ae..79f2a2f2 100644
--- a/subjects/iterativefactorial.fr.md
+++ b/subjects/iterativefactorial.fr.md
@@ -1,12 +1,12 @@
-# iterativefactorial
+## iterativefactorial
-## Intructions
+### Intructions
Écrire une fonction **itérative** qui renvoie la factorielle d'un `int` passé en paramètre.
Les erreurs (valeurs non possibles ou overflows) renverront `0`.
-## Fonction attendue
+### Fonction attendue
```go
func IterativeFactorial(int nb) int {
@@ -14,7 +14,7 @@ func IterativeFactorial(int nb) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/iterativepower.en.md b/subjects/iterativepower.en.md
index 26586a26..a7d30fea 100644
--- a/subjects/iterativepower.en.md
+++ b/subjects/iterativepower.en.md
@@ -1,12 +1,12 @@
-# iterativepower
+## iterativepower
-## Intructions
+### Intructions
Write an **iterative** function that returns the power of the `int` passed as parameter.
Negative powers will return `0`. Overflows do **not** have to be dealt with.
-## Expected function
+### Expected function
```go
func IterativePower(int nb, int power) int {
@@ -14,7 +14,7 @@ func IterativePower(int nb, int power) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/iterativepower.fr.md b/subjects/iterativepower.fr.md
index 6088ab9b..c4fac89d 100644
--- a/subjects/iterativepower.fr.md
+++ b/subjects/iterativepower.fr.md
@@ -1,12 +1,12 @@
-# iterativepower
+## iterativepower
-## Intructions
+### Intructions
Écrire une fonction **itérative** qui renvoie la puissance de deux `int` passés en paramètre.
Les puissances négatives renverront `0`. Les overflows **ne doivent pas** être gérés.
-## Fonction attendue
+### Fonction attendue
```go
func IterativePower(int nb, int power) int {
@@ -14,7 +14,7 @@ func IterativePower(int nb, int power) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/join.en.md b/subjects/join.en.md
index 80bb2904..cf5800d3 100644
--- a/subjects/join.en.md
+++ b/subjects/join.en.md
@@ -1,10 +1,10 @@
-# join
+## join
-## Instructions
+### Instructions
Write a function that returns the concatenation of all the `string` of a table of `string` **separated** by the separator passed in argument.
-## Expected function
+### Expected function
```go
func Join(strs []string, sep string) string {
@@ -12,7 +12,7 @@ func Join(strs []string, sep string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/join.fr.md b/subjects/join.fr.md
index 57beea67..03317193 100644
--- a/subjects/join.fr.md
+++ b/subjects/join.fr.md
@@ -1,10 +1,10 @@
-# join
+## join
-## Instructions
+### Instructions
Écrire une fonction qui retourne la concaténation de deux `string` **séparées** par le séparateur passées en paramètres.
-## Fonction attendue
+### Fonction attendue
```go
func Join(strs []string, sep string) string{
@@ -12,7 +12,7 @@ func Join(strs []string, sep string) string{
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/lastrune.en.md b/subjects/lastrune.en.md
index 495ed812..03a11067 100644
--- a/subjects/lastrune.en.md
+++ b/subjects/lastrune.en.md
@@ -1,10 +1,10 @@
-# lastrune
+## lastrune
-## Instructions
+### Instructions
Write a function that returns the last `rune` of a `string`.
-## Expected function
+### Expected function
```go
func LastRune(s string) rune {
@@ -12,7 +12,7 @@ func LastRune(s string) rune {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/lastrune.fr.md b/subjects/lastrune.fr.md
index d439daba..da208207 100644
--- a/subjects/lastrune.fr.md
+++ b/subjects/lastrune.fr.md
@@ -1,10 +1,10 @@
-# lastrune
+## lastrune
-## Instructions
+### Instructions
Écrire une fonction qui retourne la dernière `rune` d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func LastRune(s string) rune {
@@ -12,7 +12,7 @@ func LastRune(s string) rune {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listat.en.md b/subjects/listat.en.md
index 4298d54e..4518a82d 100644
--- a/subjects/listat.en.md
+++ b/subjects/listat.en.md
@@ -1,12 +1,12 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListAt` that haves one pointer to the list, `l`, and an `int` as parameters. This function should print a `Node` of the linked list, depending on the number, `nbr`.
- In case of error it should print `nil`
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -20,7 +20,7 @@ func ListAt(l *Node, nbr int) *Node{
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listat.fr.md b/subjects/listat.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listat.fr.md
+++ b/subjects/listat.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listclear.en.md b/subjects/listclear.en.md
index 9830399e..0da3b3c9 100644
--- a/subjects/listclear.en.md
+++ b/subjects/listclear.en.md
@@ -1,12 +1,12 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListClear` that delets all `nodes` from a linked list, deleting the link between the list.
- Tip: assign the list's pointer to nil
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -24,7 +24,7 @@ func ListClear(l *List) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listclear.fr.md b/subjects/listclear.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listclear.fr.md
+++ b/subjects/listclear.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listfind.en.md b/subjects/listfind.en.md
index aec36d3e..4979b846 100644
--- a/subjects/listfind.en.md
+++ b/subjects/listfind.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListFind` that returns the address of the first link that the function in the arguments its equal.
@@ -8,7 +8,7 @@ Write a function `ListFind` that returns the address of the first link that the
- Use pointers wen ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -30,7 +30,7 @@ func ListFind(l *list, comp func(l *list) bool) *interface{} {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listfind.fr.md b/subjects/listfind.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listfind.fr.md
+++ b/subjects/listfind.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listforeach.en.md b/subjects/listforeach.en.md
index 5b34cf45..025c0e52 100644
--- a/subjects/listforeach.en.md
+++ b/subjects/listforeach.en.md
@@ -1,12 +1,12 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListForEach` that applies a function given as argument to the information within each of the list's links.
- The function given as argument must have a pointer as argument: `l *list`
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -23,7 +23,7 @@ func ListForEach(l *list, f func(l *list)) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listforeach.fr.md b/subjects/listforeach.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listforeach.fr.md
+++ b/subjects/listforeach.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listforeachif.en.md b/subjects/listforeachif.en.md
index 3b97056d..501d047f 100644
--- a/subjects/listforeachif.en.md
+++ b/subjects/listforeachif.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListForEachIf` that applies a function given as argument to the information within some links of the list.
@@ -10,7 +10,7 @@ Write a function `ListForEachIf` that applies a function given as argument to th
- Use pointers wen ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -32,7 +32,7 @@ func ListForEachIf(l *list, f func(l *list), comp func(l *list) bool) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listforeachif.fr.md b/subjects/listforeachif.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listforeachif.fr.md
+++ b/subjects/listforeachif.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listlast.en.md b/subjects/listlast.en.md
index 329123bc..24503898 100644
--- a/subjects/listlast.en.md
+++ b/subjects/listlast.en.md
@@ -1,10 +1,10 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListLast` that returns the last element of the linked list.
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -21,7 +21,7 @@ func ListLast(l *list) *list {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listlast.fr.md b/subjects/listlast.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listlast.fr.md
+++ b/subjects/listlast.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listmerge.en.md b/subjects/listmerge.en.md
index ce2ec03d..e29427f5 100644
--- a/subjects/listmerge.en.md
+++ b/subjects/listmerge.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListMerge` that places elements of a list `l2` at the end of an other list `l1`.
@@ -8,7 +8,7 @@ Write a function `ListMerge` that places elements of a list `l2` at the end of a
- Use pointers when ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -26,7 +26,7 @@ func ListMerge(l1 *list, l2 *list) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listmerge.fr.md b/subjects/listmerge.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listmerge.fr.md
+++ b/subjects/listmerge.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listpushback.en.md b/subjects/listpushback.en.md
index 8ede0b59..eada7bf9 100644
--- a/subjects/listpushback.en.md
+++ b/subjects/listpushback.en.md
@@ -1,10 +1,10 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListPushBack` that inserts a new element `Node` at the end of the list, using the structure `List`
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -21,7 +21,7 @@ func ListPushBack(l *List, data interface{}) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listpushback.fr.md b/subjects/listpushback.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listpushback.fr.md
+++ b/subjects/listpushback.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listpushfront.en.md b/subjects/listpushfront.en.md
index f7014021..0e1e511b 100644
--- a/subjects/listpushfront.en.md
+++ b/subjects/listpushfront.en.md
@@ -1,10 +1,10 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListPushBack` that inserts a new element `node` at the beginning of the list using `list`
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -21,7 +21,7 @@ func ListPushFront(l *list, data interface{}) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listpushfront.fr.md b/subjects/listpushfront.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listpushfront.fr.md
+++ b/subjects/listpushfront.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listpushparams.en.md b/subjects/listpushparams.en.md
index d4868fe1..c799dce2 100644
--- a/subjects/listpushparams.en.md
+++ b/subjects/listpushparams.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a program that creates a new linked list and includes each command-line argument in to the list.
diff --git a/subjects/listpushparams.fr.md b/subjects/listpushparams.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listpushparams.fr.md
+++ b/subjects/listpushparams.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listremoveif.en.md b/subjects/listremoveif.en.md
index 5fd911d9..b27311ed 100644
--- a/subjects/listremoveif.en.md
+++ b/subjects/listremoveif.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListRemoveIf` that removes all elements that are equal to the `data_ref` introduced in the argument of the function.
@@ -8,7 +8,7 @@ Write a function `ListRemoveIf` that removes all elements that are equal to the
- Use pointers wen ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -26,7 +26,7 @@ func ListRemoveIf(l *list, data_ref interface{}) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listremoveif.fr.md b/subjects/listremoveif.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listremoveif.fr.md
+++ b/subjects/listremoveif.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listreverse.en.md b/subjects/listreverse.en.md
index 2f9d80fe..a602a052 100644
--- a/subjects/listreverse.en.md
+++ b/subjects/listreverse.en.md
@@ -1,12 +1,12 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListReverse` that reverses the elements order of a given linked list.
- Use pointers when ever you can
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -23,7 +23,7 @@ func ListReverse(l *list) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listreverse.fr.md b/subjects/listreverse.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listreverse.fr.md
+++ b/subjects/listreverse.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listsize.en.md b/subjects/listsize.en.md
index b520b872..c69f59f8 100644
--- a/subjects/listsize.en.md
+++ b/subjects/listsize.en.md
@@ -1,10 +1,10 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListSize` that returns the number of elements in the list.
-## Expected function and structure
+### Expected function and structure
```go
type Node struct {
@@ -22,7 +22,7 @@ func ListSize(l *List) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listsize.fr.md b/subjects/listsize.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listsize.fr.md
+++ b/subjects/listsize.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/listsort.en.md b/subjects/listsort.en.md
index 14f29496..b690cb98 100644
--- a/subjects/listsort.en.md
+++ b/subjects/listsort.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `ListSort` that sorts the linked list by ascending order.
@@ -10,7 +10,7 @@ Write a function `ListSort` that sorts the linked list by ascending order.
- Use pointers when ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -23,7 +23,7 @@ func ListSort(l *node) *node {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/listsort.fr.md b/subjects/listsort.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/listsort.fr.md
+++ b/subjects/listsort.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/make-it-better.en.md b/subjects/make-it-better.en.md
index 016dd955..936388b5 100644
--- a/subjects/make-it-better.en.md
+++ b/subjects/make-it-better.en.md
@@ -1,6 +1,6 @@
-# make-it-better
+## make-it-better
-## Instructions
+### Instructions
Create the files and directories so that when you use the command `ls` below the output will looks like this :
diff --git a/subjects/make-it-better.fr.md b/subjects/make-it-better.fr.md
index eb9a0303..a0c3885b 100644
--- a/subjects/make-it-better.fr.md
+++ b/subjects/make-it-better.fr.md
@@ -1,6 +1,6 @@
-# make-it-better
+## make-it-better
-## Instructions
+### Instructions
Créer les fichiers et dossiers de tel sorte que lorsque cette commande `ls` ci-dessous est utilisée, l'`output` ressemble à cela :
diff --git a/subjects/makerange.en.md b/subjects/makerange.en.md
index e6516af6..0c96b368 100644
--- a/subjects/makerange.en.md
+++ b/subjects/makerange.en.md
@@ -1,6 +1,6 @@
-# makerange
+## makerange
-## Instructions
+### Instructions
Write a function that takes an `int` min and an `int` max as parameters.
That function returns a slice of `int` with all the values between min and max.
@@ -11,14 +11,14 @@ If min is superior or equal to max, a `nil` slice is returned.
`append` is not allowed for this exercise.
-## Expected function
+### Expected function
```go
func MakeRange(min, max int) []int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/makerange.fr.md b/subjects/makerange.fr.md
index 9edf6692..3e12b377 100644
--- a/subjects/makerange.fr.md
+++ b/subjects/makerange.fr.md
@@ -1,6 +1,6 @@
-# makerange
+## makerange
-## Instructions
+### Instructions
Écrire une fonction qui prend un `int` minimum et un `int` maximum comme paramètres. Cette fonction retournes une slice d'`int` avec toutes les valeurs comprises entre le minimum et le maximum.
@@ -10,14 +10,14 @@ Si le minimum est supérieur ou égal au maximum, une slice `nil` est retournée
`append` n'est pas autorisé pour cet exercice.
-## Fonction attendue
+### Fonction attendue
```go
func MakeRange(min, max int) []int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/map.en.md b/subjects/map.en.md
index caa35d78..c1112463 100644
--- a/subjects/map.en.md
+++ b/subjects/map.en.md
@@ -1,17 +1,17 @@
-# map
+## map
-## Instructions
+### Instructions
Write a function `Map` that, for an `int` array, applies a function of this type `func(int) bool` on each elements of that array and returns an array of all the return values.
-## Expected function
+### Expected function
```go
func Map(f func(int) bool, arr []int) []bool {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/map.fr.md b/subjects/map.fr.md
index 478219a5..6b518816 100644
--- a/subjects/map.fr.md
+++ b/subjects/map.fr.md
@@ -1,17 +1,17 @@
-# map
+## map
-## Instructions
+### Instructions
Écrire une fonction `Map` qui, pour un tableau d'`int`, applique une fonction de type `func(int) bool` sur chaque éléments de ce tableau et retournes un tableau de toutes les valeurs de retour.
-## Fonction attendue
+### Fonction attendue
```go
func Map(f func(int) bool, arr []int) []bool {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/now-get-to-work.en.md b/subjects/now-get-to-work.en.md
index bf2fc418..6ac5d5be 100644
--- a/subjects/now-get-to-work.en.md
+++ b/subjects/now-get-to-work.en.md
@@ -1,6 +1,6 @@
-# now-get-to-work
+## now-get-to-work
-## Instructions
+### Instructions
"Something terrible happened"
@@ -8,7 +8,7 @@ clone this repo : https://github.com/01-edu/the-final-cl-test
Submit your solution in the file `my_answer.sh` that will print it when executed.
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/test$ ./my_answer.sh | cat -e
@@ -16,6 +16,6 @@ John Doe$
student@ubuntu:~/piscine/test$
```
-## Hint
+### Hint
"You could combine `head` and `tail`s..."
diff --git a/subjects/now-get-to-work.fr.md b/subjects/now-get-to-work.fr.md
index 93050dee..c42efb01 100644
--- a/subjects/now-get-to-work.fr.md
+++ b/subjects/now-get-to-work.fr.md
@@ -1,6 +1,6 @@
-# now-get-to-work
+## now-get-to-work
-## Instructions
+### Instructions
"Quelque chose de terrible est arrivé"
@@ -8,7 +8,7 @@ Faîtes un clone de repo : https://github.com/01-edu/the-final-cl-test
Rendez votre solution dans un fichier `my_answer.sh` qui l'affichera quand exécuté.
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/test$ ./my_answer.sh | cat -e
@@ -16,6 +16,6 @@ John Doe$
student@ubuntu:~/piscine/test$
```
-## Hint
+### Hint
"Vous pouvez combinez `head` et `tail`s..."
diff --git a/subjects/nrune.en.md b/subjects/nrune.en.md
index b9e06a69..3cafbf16 100644
--- a/subjects/nrune.en.md
+++ b/subjects/nrune.en.md
@@ -1,10 +1,10 @@
-# nrune
+## nrune
-## Instructions
+### Instructions
Write a function that returns the nth `rune` of a `string`.
-## Expected function
+### Expected function
```go
func NRune(s string, n int) rune {
@@ -12,7 +12,7 @@ func NRune(s string, n int) rune {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/nrune.fr.md b/subjects/nrune.fr.md
index 4df28cc2..8e69dec2 100644
--- a/subjects/nrune.fr.md
+++ b/subjects/nrune.fr.md
@@ -1,10 +1,10 @@
-# nrune
+## nrune
-## Instructions
+### Instructions
Écrire une fonction qui retourne la énième `rune` d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func NRune(s string, n int) rune {
@@ -12,7 +12,7 @@ func NRune(s string, n int) rune {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/pointone.en.md b/subjects/pointone.en.md
index 1ba47cef..0329c3f4 100755
--- a/subjects/pointone.en.md
+++ b/subjects/pointone.en.md
@@ -1,10 +1,10 @@
-# pointone
+## pointone
-## Instructions
+### Instructions
- Write a function that takes a **pointer to an int** as argument and gives to this int the value of 1.
-## Expected function
+### Expected function
```go
func PointOne(n *int) {
@@ -12,7 +12,7 @@ func PointOne(n *int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/pointone.fr.md b/subjects/pointone.fr.md
index 0097705b..1b02b779 100755
--- a/subjects/pointone.fr.md
+++ b/subjects/pointone.fr.md
@@ -1,10 +1,10 @@
-# pointone
+## pointone
-## Instructions
+### Instructions
- Écrire une fonction qui prend un **pointeur sur int** en argument et qui assignes à cet int la valeur 1.
-## Fonction attendue
+### Fonction attendue
```go
func PointOne(n *int) {
@@ -12,7 +12,7 @@ func PointOne(n *int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printalphabet.en.md b/subjects/printalphabet.en.md
index 4af6e052..bf9efc56 100644
--- a/subjects/printalphabet.en.md
+++ b/subjects/printalphabet.en.md
@@ -1,12 +1,12 @@
-# printalphabet
+## printalphabet
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that prints the Latin alphabet in lowercase on a single line.
A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`).
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/printalphabet$ go build
diff --git a/subjects/printalphabet.fr.md b/subjects/printalphabet.fr.md
index f464adcb..8275d980 100644
--- a/subjects/printalphabet.fr.md
+++ b/subjects/printalphabet.fr.md
@@ -1,12 +1,12 @@
-# printalphabet
+## printalphabet
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui affiche l'alphabet latin en minuscule sur une seule ligne.
Une ligne est une suite de caractères précédant le caractère [fin de ligne](https://en.wikipedia.org/wiki/Newline) (`'\n'`).
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/printalphabet$ go build
diff --git a/subjects/printcomb.en.md b/subjects/printcomb.en.md
index d0373dff..a836e1a9 100755
--- a/subjects/printcomb.en.md
+++ b/subjects/printcomb.en.md
@@ -1,12 +1,12 @@
-# printcomb
+## printcomb
-## Instructions
+### Instructions
Write a [function](TODO-LINK) that prints in ascending order on a single line all unique combinations of three different digits so that the first digit is less than the second and the second is less than the third.
These combinations are separated by a comma and a space.
-## Expected function
+### Expected function
```go
func PrintComb() {
@@ -14,7 +14,7 @@ func PrintComb() {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printcomb.fr.md b/subjects/printcomb.fr.md
index ef5a1053..f224897a 100755
--- a/subjects/printcomb.fr.md
+++ b/subjects/printcomb.fr.md
@@ -1,12 +1,12 @@
-# printcomb
+## printcomb
-## Instructions
+### Instructions
Écrire une [fonction](TODO-LINK) qui affiche sur une seule ligne dans l'ordre croissant toutes les combinaisons possibles de trois chiffres différents tels que le premier est inférieur au second et le second est inférieur au troisième.
Les combinaisons sont séparées par une virgule et un espace.
-## Fonction attendue
+### Fonction attendue
```go
func PrintComb() {
@@ -14,7 +14,7 @@ func PrintComb() {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printcomb2.en.md b/subjects/printcomb2.en.md
index 71f25f7c..356253bf 100755
--- a/subjects/printcomb2.en.md
+++ b/subjects/printcomb2.en.md
@@ -1,12 +1,12 @@
-# printcomb2
+## printcomb2
-## Instructions
+### Instructions
Write a [function](TODO-LINK) that prints in ascending order on a single line all possible combinations of two different two-digit numbers.
These combinations are separated by a comma and a space.
-## Expected function
+### Expected function
```go
func PrintComb2() {
@@ -14,7 +14,7 @@ func PrintComb2() {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printcomb2.fr.md b/subjects/printcomb2.fr.md
index 42533406..fc32dabe 100755
--- a/subjects/printcomb2.fr.md
+++ b/subjects/printcomb2.fr.md
@@ -1,12 +1,12 @@
-# printcomb2
+## printcomb2
-## Instructions
+### Instructions
Écrire une [fonction](TODO-LINK) qui affiche sur une seule ligne dans l'ordre croissant toutes les combinaisons possibles de deux nombres différents à deux chiffres.
Les combinaisons sont séparées par une virgule et un espace.
-## Fonction attendue
+### Fonction attendue
```go
func PrintComb2() {
@@ -14,7 +14,7 @@ func PrintComb2() {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printcombn.en.md b/subjects/printcombn.en.md
index 71387068..88154648 100755
--- a/subjects/printcombn.en.md
+++ b/subjects/printcombn.en.md
@@ -1,6 +1,6 @@
-# printcombn
+## printcombn
-## Instructions
+### Instructions
- Write a function that prints all possible combinations of **n** different digits in ascending order.
@@ -12,7 +12,7 @@ below are your references for the **printing format** expected.
- (for n = 3) '012, 013, 014, 015, 016, 017, 018, 019, 023,...689, 789'
-## Expected function
+### Expected function
```go
func PrintCombN(n int) {
@@ -20,7 +20,7 @@ func PrintCombN(n int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printcombn.fr.md b/subjects/printcombn.fr.md
index 34f69e93..7cb65dbb 100755
--- a/subjects/printcombn.fr.md
+++ b/subjects/printcombn.fr.md
@@ -1,6 +1,6 @@
-# printcombn
+## printcombn
-## Instructions
+### Instructions
- Écrire une fonction qui affiche toutes les combinaisons possibles de **n** chiffres différents en ordre croissant.
@@ -12,7 +12,7 @@ ci-dessous vos références pour le **format d'affichage** attendu.
- (pour n = 3) '012, 013, 014, 015, 016, 017, 018, 019, 023,...689, 789'
-## Fonction attendue
+### Fonction attendue
```go
func PrintCombN(n int) {
diff --git a/subjects/printdigits.en.md b/subjects/printdigits.en.md
index c5798a3e..1824df87 100755
--- a/subjects/printdigits.en.md
+++ b/subjects/printdigits.en.md
@@ -1,12 +1,12 @@
-# printdigits
+## printdigits
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that prints the decimal digits in ascending order (from `0` to `9`) on a single line.
A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`).
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/printdigits$ go build
diff --git a/subjects/printdigits.fr.md b/subjects/printdigits.fr.md
index 58c2cefd..b81d59ec 100755
--- a/subjects/printdigits.fr.md
+++ b/subjects/printdigits.fr.md
@@ -1,12 +1,12 @@
-# printdigits
+## printdigits
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui affiche les chiffres décimaux dans l'ordre croissant (de `0` à `9`) sur une seule ligne.
Une ligne est une suite de caractères précédant le caractère [fin de ligne](https://en.wikipedia.org/wiki/Newline) (`'\n'`).
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/printdigits$ go build
diff --git a/subjects/printnbr.en.md b/subjects/printnbr.en.md
index 8466dba5..eefde512 100644
--- a/subjects/printnbr.en.md
+++ b/subjects/printnbr.en.md
@@ -1,12 +1,12 @@
-# printnbr
+## printnbr
-## Instructions
+### Instructions
Write a function that prints an `int` passed in parameter.
All possible values of type `int` have to go through.
You cannot convert to `int64`.
-## Expected function
+### Expected function
```go
func PrintNbr(int n) {
@@ -14,7 +14,7 @@ func PrintNbr(int n) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printnbr.fr.md b/subjects/printnbr.fr.md
index 60598591..93101b86 100644
--- a/subjects/printnbr.fr.md
+++ b/subjects/printnbr.fr.md
@@ -1,12 +1,12 @@
-# printnbr
+## printnbr
-## Instructions
+### Instructions
Écrire une fonction qui affiche un `int` passé en paramètre.
Toutes les valeurs de type `int` doivent être affichables.
Vous ne pouvez pas convertir en `int64`.
-## Fonction attendue
+### Fonction attendue
```go
func PrintNbr(int n) {
@@ -14,7 +14,7 @@ func PrintNbr(int n) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printnbrbase.en.md b/subjects/printnbrbase.en.md
index b009ca6d..27ba70dc 100644
--- a/subjects/printnbrbase.en.md
+++ b/subjects/printnbrbase.en.md
@@ -1,6 +1,6 @@
-# putnbrbase
+## putnbrbase
-## Instructions
+### Instructions
Write a function that prints an `int` in a `string` base passed in parameters.
@@ -14,7 +14,7 @@ Validity rules for a base :
The function has to manage negative numbers. (as shown in the example)
-## Expected function
+### Expected function
```go
func PrintNbrBase(nbr int, base string) () {
@@ -22,7 +22,7 @@ func PrintNbrBase(nbr int, base string) () {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printnbrbase.fr.md b/subjects/printnbrbase.fr.md
index 05dd4d63..73bb5fa8 100644
--- a/subjects/printnbrbase.fr.md
+++ b/subjects/printnbrbase.fr.md
@@ -1,6 +1,6 @@
-# putnbrbase
+## putnbrbase
-## Instructions
+### Instructions
Écrire une fonction qui affiche un `int` dans une base en `string` passés en paramètres.
@@ -14,7 +14,7 @@ Régles de validité d'une base :
La fonction doit gérer les nombres négatifs. (comme montré sur l'exemple)
-## Fonction attendue
+### Fonction attendue
```go
func PrintNbrBase(nbr int, base string) () {
@@ -22,7 +22,7 @@ func PrintNbrBase(nbr int, base string) () {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printparams.en.md b/subjects/printparams.en.md
index eeffcae2..1697e284 100644
--- a/subjects/printparams.en.md
+++ b/subjects/printparams.en.md
@@ -1,6 +1,6 @@
-# printparams
+## printparams
-## Instructions
+### Instructions
Write a **program** that prints the arguments received in the command line.
diff --git a/subjects/printparams.fr.md b/subjects/printparams.fr.md
index f96d8ac0..8cbc719f 100644
--- a/subjects/printparams.fr.md
+++ b/subjects/printparams.fr.md
@@ -1,6 +1,6 @@
-# printparams
+## printparams
-## Instructions
+### Instructions
Écrire un **programme** qui affiche les arguments en ligne de commande.
diff --git a/subjects/printprogramname.en.md b/subjects/printprogramname.en.md
index 0da4a270..114c0b61 100644
--- a/subjects/printprogramname.en.md
+++ b/subjects/printprogramname.en.md
@@ -1,6 +1,6 @@
-# printprogramname
+## printprogramname
-## Instructions
+### Instructions
Write a **program** that prints the name of the program.
diff --git a/subjects/printprogramname.fr.md b/subjects/printprogramname.fr.md
index 6f957490..6888887e 100644
--- a/subjects/printprogramname.fr.md
+++ b/subjects/printprogramname.fr.md
@@ -1,6 +1,6 @@
-# printprogramname
+## printprogramname
-## Instructions
+### Instructions
Écrire un **programme** qui affiche le nom du programme.
diff --git a/subjects/printreversealphabet.en.md b/subjects/printreversealphabet.en.md
index ddf3e45f..cbaf35b6 100755
--- a/subjects/printreversealphabet.en.md
+++ b/subjects/printreversealphabet.en.md
@@ -1,12 +1,12 @@
-# printreversealphabet
+## printreversealphabet
-## Instructions
+### Instructions
Write a [program](TODO-LINK) that prints the Latin alphabet in lowercase in reverse order (from `'z'` to `'a'`) on a single line.
A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`).
-## Usage
+### Usage
```console
student@ubuntu:~/piscine/printreversealphabet$ go build
diff --git a/subjects/printreversealphabet.fr.md b/subjects/printreversealphabet.fr.md
index a92bbeb9..bce51820 100755
--- a/subjects/printreversealphabet.fr.md
+++ b/subjects/printreversealphabet.fr.md
@@ -1,12 +1,12 @@
-# printreversealphabet
+## printreversealphabet
-## Instructions
+### Instructions
Écrire un [programme](TODO-LINK) qui affiche l'alphabet latin en minuscule dans l'ordre inverse (de `'z'` à `'a'`) sur une seule ligne.
Une ligne est une suite de caractères précédant le caractère [fin de ligne](https://en.wikipedia.org/wiki/Newline) (`'\n'`).
-## Utilisation
+### Utilisation
```console
student@ubuntu:~/piscine/printreversealphabet$ go build
diff --git a/subjects/printstr.en.md b/subjects/printstr.en.md
index 7d366f32..93896033 100755
--- a/subjects/printstr.en.md
+++ b/subjects/printstr.en.md
@@ -1,10 +1,10 @@
-# printstr
+## printstr
-## Instructions
+### Instructions
- Write a function that prints one by one the characters of a string on the screen.
-## Expected function
+### Expected function
```go
func PrintStr(str string) {
@@ -12,7 +12,7 @@ func PrintStr(str string) {
}
```
-## Hints
+### Hints
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printstr.fr.md b/subjects/printstr.fr.md
index a553a6d5..5f02e1c1 100755
--- a/subjects/printstr.fr.md
+++ b/subjects/printstr.fr.md
@@ -1,10 +1,10 @@
-# putstr
+## putstr
-## Instructions
+### Instructions
- Écrire une fonction qui affiche un à un les caractères d'une chaîne à l'écran.
-## Fonction attendue
+### Fonction attendue
```go
func PrintStr(str string) {
@@ -12,7 +12,7 @@ func PrintStr(str string) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/printwordstables.en.md b/subjects/printwordstables.en.md
index bf49cd1c..248af853 100644
--- a/subjects/printwordstables.en.md
+++ b/subjects/printwordstables.en.md
@@ -1,6 +1,6 @@
-# printwordstables
+## printwordstables
-## Instructions
+### Instructions
Write a function that prints the words of a `string` array that will be returned a function `SplitWhiteSpaces`. (the testing will be done with ours)
@@ -8,14 +8,14 @@ Each word is on a single line.
Each word ends with a `\n`.
-## Expected function
+### Expected function
```go
func PrintWordsTables(table []string) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/printwordstables.fr.md b/subjects/printwordstables.fr.md
index 3df6abd2..b040b60a 100644
--- a/subjects/printwordstables.fr.md
+++ b/subjects/printwordstables.fr.md
@@ -1,6 +1,6 @@
-# printwordstables
+## printwordstables
-## Instructions
+### Instructions
Écrire une fonction qui affiche les mots d'un tableau de `string` qui sera le resultat d'une fonction `SplitWhiteSpaces`. (les tests seront effectués avec la notre)
@@ -8,14 +8,14 @@ Chaque mot est sur une seule ligne.
Chaque mot fini avec un `\n`.
-## Fonction attendue
+### Fonction attendue
```go
func PrintWordsTables(table []string) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/public.en.md b/subjects/public.en.md
index 369177c5..7f8d501a 100644
--- a/subjects/public.en.md
+++ b/subjects/public.en.md
@@ -1 +1 @@
-# public
+## public
diff --git a/subjects/recursivefactorial.en.md b/subjects/recursivefactorial.en.md
index cce40b24..fa267a35 100644
--- a/subjects/recursivefactorial.en.md
+++ b/subjects/recursivefactorial.en.md
@@ -1,6 +1,6 @@
-# recursivefactorial
+## recursivefactorial
-## Intructions
+### Intructions
Write a **recursive** function that returns the factorial of the `int` passed as parameter.
@@ -8,7 +8,7 @@ Errors (non possible values or overflows) will return `0`.
`for` is **forbidden** for this exercise.
-## Expected function
+### Expected function
```go
func RecursiveFactorial(int nb) int {
@@ -16,7 +16,7 @@ func RecursiveFactorial(int nb) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/recursivefactorial.fr.md b/subjects/recursivefactorial.fr.md
index 7b1a4d3f..fba6dfaf 100644
--- a/subjects/recursivefactorial.fr.md
+++ b/subjects/recursivefactorial.fr.md
@@ -1,6 +1,6 @@
-# recursivefactorial
+## recursivefactorial
-## Intructions
+### Intructions
Écrire une fonction **récursive** qui renvoie la factorielle d'un `int` passé en paramètre.
@@ -8,7 +8,7 @@ Les erreurs (valeurs non possibles ou overflows) renverront `0`.
`for` est **interdit** pour cet exercice.
-## Fonction attendue
+### Fonction attendue
```go
func RecursiveFactorial(int nb) int {
@@ -16,7 +16,7 @@ func RecursiveFactorial(int nb) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/recursivepower.en.md b/subjects/recursivepower.en.md
index eb52192c..90c58c67 100644
--- a/subjects/recursivepower.en.md
+++ b/subjects/recursivepower.en.md
@@ -1,6 +1,6 @@
-# recursivepower
+## recursivepower
-## Intructions
+### Intructions
Write an **recursive** function that returns the power of the `int` passed as parameter.
@@ -8,7 +8,7 @@ Negative powers will return `0`. Overflows do **not** have to be dealt with.
`for` is **forbidden** for this exercise.
-## Expected function
+### Expected function
```go
func RecursivePower(int nb, int power) int {
@@ -16,7 +16,7 @@ func RecursivePower(int nb, int power) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/recursivepower.fr.md b/subjects/recursivepower.fr.md
index c2b255ff..b47509c8 100644
--- a/subjects/recursivepower.fr.md
+++ b/subjects/recursivepower.fr.md
@@ -1,6 +1,6 @@
-# recursivepower
+## recursivepower
-## Intructions
+### Intructions
Écrire une fonction **récursive** qui renvoie la puissance de deux `int` passés en paramètre.
@@ -8,7 +8,7 @@ Les puissances négatives renverront `0`. Les overflows **ne doivent pas** être
`for` est **interdit** pour cet exercice.
-## Fonction attendue
+### Fonction attendue
```go
func RecursivePower(int nb, int power) int {
@@ -16,7 +16,7 @@ func RecursivePower(int nb, int power) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/revparams.en.md b/subjects/revparams.en.md
index 33dcf10a..d387913a 100644
--- a/subjects/revparams.en.md
+++ b/subjects/revparams.en.md
@@ -1,6 +1,6 @@
-# revparams
+## revparams
-## Instructions
+### Instructions
Write a **program** that prints the arguments received in the command line in a reverse order.
diff --git a/subjects/revparams.fr.md b/subjects/revparams.fr.md
index 35cd2526..7c775531 100644
--- a/subjects/revparams.fr.md
+++ b/subjects/revparams.fr.md
@@ -1,6 +1,6 @@
-# revparams
+## revparams
-## Instructions
+### Instructions
Écrire un **programme** qui affiche les arguments en ligne de commande en ordre inverse.
diff --git a/subjects/set.en.md b/subjects/set.en.md
index b673118b..ef45e24f 100644
--- a/subjects/set.en.md
+++ b/subjects/set.en.md
@@ -1,12 +1,12 @@
-# set
+## set
-## Setting up your development workspace
+### Setting up your development workspace
[GitHub account](TODO-VIDEO-LINK)
-### Choose your code editor
+#### Choose your code editor
- [VS Code](TODO-LINK)
- [Sublime Text](TODO-LINK)
-### [How to submit your code with Git](TODO-VIDEO-LINK)
+#### [How to submit your code with Git](TODO-VIDEO-LINK)
diff --git a/subjects/sortedlistmerge.en.md b/subjects/sortedlistmerge.en.md
index 948738d0..7653c3e0 100644
--- a/subjects/sortedlistmerge.en.md
+++ b/subjects/sortedlistmerge.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `SortedListMerge` that mereges two lists, `l1` and `l2`, but it as to join them in ascending order.
@@ -8,7 +8,7 @@ Write a function `SortedListMerge` that mereges two lists, `l1` and `l2`, but it
- Use pointers when ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -21,7 +21,7 @@ func SortedListMerge(l1 *node, l2 *node) *node {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sortedlistmerge.fr.md b/subjects/sortedlistmerge.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/sortedlistmerge.fr.md
+++ b/subjects/sortedlistmerge.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/sortintegertable.en.md b/subjects/sortintegertable.en.md
index 0828b745..ca2ff301 100755
--- a/subjects/sortintegertable.en.md
+++ b/subjects/sortintegertable.en.md
@@ -1,10 +1,10 @@
-# sortintegertable
+## sortintegertable
-## Instructions
+### Instructions
- Write a function that reorder an array of `int` in ascending order.
-## Expected function
+### Expected function
```go
func SortIntegerTable(table []int) {
@@ -12,7 +12,7 @@ func SortIntegerTable(table []int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sortintegertable.fr.md b/subjects/sortintegertable.fr.md
index 06c2a1bf..3c92b2f0 100755
--- a/subjects/sortintegertable.fr.md
+++ b/subjects/sortintegertable.fr.md
@@ -1,10 +1,10 @@
-# sortintegertable
+## sortintegertable
-## Instructions
+### Instructions
- Écrire une fonction qui trie un tableau d'`int` (entier) par ordre croissant.
-## Fonction attendue
+### Fonction attendue
```go
func SortIntegerTable(table []int) {
@@ -12,7 +12,7 @@ func SortIntegerTable(table []int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/sortlistinsert.en.md b/subjects/sortlistinsert.en.md
index fb578726..b84a35b9 100644
--- a/subjects/sortlistinsert.en.md
+++ b/subjects/sortlistinsert.en.md
@@ -1,6 +1,6 @@
-# listpushback
+## listpushback
-## Instructions
+### Instructions
Write a function `SortListInsert` that inserts `data_ref` in the linked list, but it as to remain sorted in ascending order.
@@ -8,7 +8,7 @@ Write a function `SortListInsert` that inserts `data_ref` in the linked list, bu
- Use pointers when ever you can.
-## Expected function and structure
+### Expected function and structure
```go
type node struct {
@@ -21,7 +21,7 @@ func SortListInsert(l *node, data_ref int) *node{
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sortlistinsert.fr.md b/subjects/sortlistinsert.fr.md
index 7ff57ef8..7db913a6 100644
--- a/subjects/sortlistinsert.fr.md
+++ b/subjects/sortlistinsert.fr.md
@@ -1,17 +1,17 @@
-# countif
+## countif
-## Instructions
+### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
-## Fonction attendue
+### Fonction attendue
```go
func CountIf(f func(string) bool, tab []string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/sortparams.en.md b/subjects/sortparams.en.md
index 1aee36b8..bd482d0a 100644
--- a/subjects/sortparams.en.md
+++ b/subjects/sortparams.en.md
@@ -1,6 +1,6 @@
-# sortparams
+## sortparams
-## Instructions
+### Instructions
Write a **program** that prints the arguments received in the command line in ASCII order.
diff --git a/subjects/sortparams.fr.md b/subjects/sortparams.fr.md
index c644312a..f5c6e5ca 100644
--- a/subjects/sortparams.fr.md
+++ b/subjects/sortparams.fr.md
@@ -1,6 +1,6 @@
-# sortparams
+## sortparams
-## Instructions
+### Instructions
Écrire un **programme** qui affiche les arguments en ligne de commande en ordre asscii.
diff --git a/subjects/sortwordarr.en.md b/subjects/sortwordarr.en.md
index da2efbda..f1e10c7c 100644
--- a/subjects/sortwordarr.en.md
+++ b/subjects/sortwordarr.en.md
@@ -1,17 +1,17 @@
-# sortwordarr
+## sortwordarr
-## Instructions
+### Instructions
Write a function `SortWordArr` that sorts by `ascii` a `string` array.
-## Expected function
+### Expected function
```go
func SortWordArr(array []string) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sortwordarr.fr.md b/subjects/sortwordarr.fr.md
index f37fdf0e..6a0d81d7 100644
--- a/subjects/sortwordarr.fr.md
+++ b/subjects/sortwordarr.fr.md
@@ -1,17 +1,17 @@
-# sortwordarr
+## sortwordarr
-## Instructions
+### Instructions
Écrire une fonction `SortWordArr` qui trie par ordre `ascii` un tableau de `string`.
-## Fonction attendue
+### Fonction attendue
```go
func SortWordArr(array []string) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/split.en.md b/subjects/split.en.md
index c6b31e7b..f1c3366c 100644
--- a/subjects/split.en.md
+++ b/subjects/split.en.md
@@ -1,19 +1,19 @@
-# split
+## split
-## Instructions
+### Instructions
Write a function that seperates the words of a `string` and puts them in a `string` array.
The separators are the characters of the charset `string` given in parameter.
-## Expected function
+### Expected function
```go
func Split(str, charset string) []string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/split.fr.md b/subjects/split.fr.md
index d6b1bdd0..efa7f9d4 100644
--- a/subjects/split.fr.md
+++ b/subjects/split.fr.md
@@ -1,19 +1,19 @@
-# split
+## split
-## Instructions
+### Instructions
Écrire une fonction qui sépare les mots d'une `string` et les met dans un tableau de `string`.
Les séparateurs sont les charactéres de la `string` charset donnée en paramétre.
-## Fonction attendue
+### Fonction attendue
```go
func Split(str, charset string) []string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/splitwhitespaces.en.md b/subjects/splitwhitespaces.en.md
index 7930d310..e358921e 100644
--- a/subjects/splitwhitespaces.en.md
+++ b/subjects/splitwhitespaces.en.md
@@ -1,19 +1,19 @@
-# splitwhitespaces
+## splitwhitespaces
-## Instructions
+### Instructions
Write a function that separates the words of a `string` and puts them in a `string` array.
The separators are spaces, tabs and newlines.
-## Expected function
+### Expected function
```go
func SplitWhiteSpaces(str string) []string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/splitwhitespaces.fr.md b/subjects/splitwhitespaces.fr.md
index 6c85718e..0f9776e1 100644
--- a/subjects/splitwhitespaces.fr.md
+++ b/subjects/splitwhitespaces.fr.md
@@ -1,19 +1,19 @@
-# splitwhitespaces
+## splitwhitespaces
-## Instructions
+### Instructions
Écrire une fonction qui sépare les mots d'une `string` et les met dans un tableau de `string`.
Les séparateurs sont les espaces, les tabulations et les retours à la ligne.
-## Fonction attendue
+### Fonction attendue
```go
func SplitWhiteSpaces(str string) []string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/sqrt.en.md b/subjects/sqrt.en.md
index 7b82042b..c6a5373c 100644
--- a/subjects/sqrt.en.md
+++ b/subjects/sqrt.en.md
@@ -1,10 +1,10 @@
-# sqrt
+## sqrt
-## Intructions
+### Intructions
Write a function that returns the square root of the `int` passed as parameter if that square root is a whole number. Otherwise it returns `0`.
-## Expected function
+### Expected function
```go
func Sqrt(int nb) int {
@@ -12,7 +12,7 @@ func Sqrt(int nb) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/sqrt.fr.md b/subjects/sqrt.fr.md
index 148422ad..076385ed 100644
--- a/subjects/sqrt.fr.md
+++ b/subjects/sqrt.fr.md
@@ -1,10 +1,10 @@
-# sqrt
+## sqrt
-## Intructions
+### Intructions
Écrire une fonction qui renvoie la racine carré d'un `int` passé en paramètre as parameter si cette racine carré est un nombre entier. Autrement elle renvoie `0`.
-## Fonction attendue
+### Fonction attendue
```go
func Sqrt(int nb) int {
@@ -12,7 +12,7 @@ func Sqrt(int nb) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/strlen.en.md b/subjects/strlen.en.md
index a0197e8a..9e3e5dee 100755
--- a/subjects/strlen.en.md
+++ b/subjects/strlen.en.md
@@ -1,10 +1,10 @@
-# strlen
+## strlen
-## Instructions
+### Instructions
- Write a function that counts the characters of a string and that returns that count.
-## Expected function
+### Expected function
```go
func StrLen(str string) int {
@@ -12,7 +12,7 @@ func StrLen(str string) int {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/strlen.fr.md b/subjects/strlen.fr.md
index b5d957e0..a880e7ae 100755
--- a/subjects/strlen.fr.md
+++ b/subjects/strlen.fr.md
@@ -1,10 +1,10 @@
-# strlen
+## strlen
-## Instructions
+### Instructions
- Écrire une fonction qui compte le nombre de caractères d'une chaîne et qui retourne le nombre trouvé.
-## Fonction attendue
+### Fonction attendue
```go
func StrLen(str string) int {
@@ -12,7 +12,7 @@ func StrLen(str string) int {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/strrev.en.md b/subjects/strrev.en.md
index 643f0ab3..a5ee9cd8 100755
--- a/subjects/strrev.en.md
+++ b/subjects/strrev.en.md
@@ -1,12 +1,12 @@
-# strrev
+## strrev
-## Instructions
+### Instructions
- Write a function that reverses a `string`.
- This function will **return** the s `string`.
-## Expected function
+### Expected function
```go
func StrRev(s string) string {
@@ -14,7 +14,7 @@ func StrRev(s string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/strrev.fr.md b/subjects/strrev.fr.md
index c5a60aa1..e8b34f35 100755
--- a/subjects/strrev.fr.md
+++ b/subjects/strrev.fr.md
@@ -1,12 +1,12 @@
-# strrev
+## strrev
-## Instructions
+### Instructions
- Écrire une fonction qui inverse une chaîne de caractères(`string`).
- Cette fonction **retournera** la chaîne de caractères s(`string`).
-## Fonction attendue
+### Fonction attendue
```go
func StrRev(s string) string {
@@ -14,7 +14,7 @@ func StrRev(s string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/swap.en.md b/subjects/swap.en.md
index 31d0c61a..82d0d04f 100755
--- a/subjects/swap.en.md
+++ b/subjects/swap.en.md
@@ -1,10 +1,10 @@
-# swap
+## swap
-## Instructions
+### Instructions
- Write a function that swaps the contents of two **pointers to an int** (`*int`).
-## Expected function
+### Expected function
```go
func Swap(a *int, b *int) {
@@ -12,7 +12,7 @@ func Swap(a *int, b *int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/swap.fr.md b/subjects/swap.fr.md
index 879d3844..42fdc85f 100755
--- a/subjects/swap.fr.md
+++ b/subjects/swap.fr.md
@@ -1,10 +1,10 @@
-# swap
+## swap
-## Instructions
+### Instructions
- Écrire une fonction qui échange les contenus de deux **pointeurs sur entier** (`*int`).
-## Fonction attendue
+### Fonction attendue
```go
func Swap(a *int, b *int) {
@@ -12,7 +12,7 @@ func Swap(a *int, b *int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/to-git-or-not-to-git.en.md b/subjects/to-git-or-not-to-git.en.md
index 324bdea2..c312c410 100644
--- a/subjects/to-git-or-not-to-git.en.md
+++ b/subjects/to-git-or-not-to-git.en.md
@@ -1,11 +1,11 @@
-# to-git-or-not-to-git-?
+## to-git-or-not-to-git-?
-## Instructions
+### Instructions
Write in a file `to-git-or-not-to-git.sh` the command that isolates your `gitHub id`.
Only the numbers will appears.
-## Usage
+### Usage
```console
$ ./to-git-or-not-to-git.sh
diff --git a/subjects/to-git-or-not-to-git.fr.md b/subjects/to-git-or-not-to-git.fr.md
index 83baac4b..7e9c5ba7 100644
--- a/subjects/to-git-or-not-to-git.fr.md
+++ b/subjects/to-git-or-not-to-git.fr.md
@@ -1,11 +1,11 @@
-# to-git-or-not-to-git-?
+## to-git-or-not-to-git-?
-## Instructions
+### Instructions
Écrire dans un fichier `to-git-or-not-to-git.sh` la commande qui isoles votre `gitHub id`.
Seulement les chiffres apparaitront.
-## Utilisation
+### Utilisation
```console
$ ./to-git-or-not-to-git.sh
diff --git a/subjects/tolower.en.md b/subjects/tolower.en.md
index 3975d788..0f366d8a 100644
--- a/subjects/tolower.en.md
+++ b/subjects/tolower.en.md
@@ -1,10 +1,10 @@
-# tolower
+## tolower
-## Instructions
+### Instructions
Write a function that lowercases each letter of `string`.
-## Expected function
+### Expected function
```go
func ToLower(s string) string {
@@ -12,7 +12,7 @@ func ToLower(s string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/tolower.fr.md b/subjects/tolower.fr.md
index e1b70b85..b709621b 100644
--- a/subjects/tolower.fr.md
+++ b/subjects/tolower.fr.md
@@ -1,10 +1,10 @@
-# tolower
+## tolower
-## Instructions
+### Instructions
Écrire une fonction qui met en minuscule chaque lettre d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func ToLower(s string) string {
@@ -12,7 +12,7 @@ func ToLower(s string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/toupper.en.md b/subjects/toupper.en.md
index 09d5a3db..62aad29c 100644
--- a/subjects/toupper.en.md
+++ b/subjects/toupper.en.md
@@ -1,10 +1,10 @@
-# toupper
+## toupper
-## Instructions
+### Instructions
Write a function that capitalizes each letter of `string`.
-## Expected function
+### Expected function
```go
func ToUpper(s string) string {
@@ -12,7 +12,7 @@ func ToUpper(s string) string {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/toupper.fr.md b/subjects/toupper.fr.md
index 94ac9200..2750bf08 100644
--- a/subjects/toupper.fr.md
+++ b/subjects/toupper.fr.md
@@ -1,10 +1,10 @@
-# toupper
+## toupper
-## Instructions
+### Instructions
Écrire une fonction qui met en majuscule chaque lettre d'une `string`.
-## Fonction attendue
+### Fonction attendue
```go
func ToUpper(s string) string {
@@ -12,7 +12,7 @@ func ToUpper(s string) string {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/ultimatedivmod.en.md b/subjects/ultimatedivmod.en.md
index b1d65f51..0f07bd8c 100755
--- a/subjects/ultimatedivmod.en.md
+++ b/subjects/ultimatedivmod.en.md
@@ -1,10 +1,10 @@
-# ultimatedivmod
+## ultimatedivmod
-## Instructions
+### Instructions
- Write a function that will be formatted as below.
-## Expected function
+### Expected function
```go
func UltimateDivMod(a *int, b *int) {
@@ -16,7 +16,7 @@ func UltimateDivMod(a *int, b *int) {
- The result of this division will be stored in the int pointed by **a**.
- The remainder of this division will be stored in the int pointed by **b**.
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/ultimatedivmod.fr.md b/subjects/ultimatedivmod.fr.md
index 5514f268..c4fe57c9 100755
--- a/subjects/ultimatedivmod.fr.md
+++ b/subjects/ultimatedivmod.fr.md
@@ -1,10 +1,10 @@
-# ultimatedivmod
+## ultimatedivmod
-## Instructions
+### Instructions
- Écrire une fonction qui aura le format ci-dessous.
-## Fonction attendue
+### Fonction attendue
```go
func UltimateDivMod(a *int, b *int) {
@@ -16,7 +16,7 @@ func UltimateDivMod(a *int, b *int) {
- Le résultat de la division sera stocké dans l'int pointé par **a**.
- Le reste de cette division sera stocké dans l'int pointé par **b**.
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/ultimatepointone.en.md b/subjects/ultimatepointone.en.md
index aab539a6..acbdb7e2 100755
--- a/subjects/ultimatepointone.en.md
+++ b/subjects/ultimatepointone.en.md
@@ -1,10 +1,10 @@
-# ultimatepointone
+## ultimatepointone
-## Instructions
+### Instructions
- Write a function that takes a **pointer to a pointer to a pointer to an int** as argument and gives to this int the value of 1.
-## Expected function
+### Expected function
```go
func UltimatePointOne(n ***int) {
@@ -12,7 +12,7 @@ func UltimatePointOne(n ***int) {
}
```
-## Usage
+### Usage
Here is a possible [program](TODO-LINK) to test your function :
diff --git a/subjects/ultimatepointone.fr.md b/subjects/ultimatepointone.fr.md
index b229f624..8b4bdaad 100755
--- a/subjects/ultimatepointone.fr.md
+++ b/subjects/ultimatepointone.fr.md
@@ -1,10 +1,10 @@
-# ultimatepointone
+## ultimatepointone
-## Instructions
+### Instructions
- Écrire une fonction qui prend un **pointeur sur pointeur sur pointeur sur int** en argument et qui assignes à cet int la valeur 1.
-## Fonction attendue
+### Fonction attendue
```go
func UltimatePointOne(n ***int) {
@@ -12,7 +12,7 @@ func UltimatePointOne(n ***int) {
}
```
-## Utilisation
+### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
diff --git a/subjects/who-are-you.en.md b/subjects/who-are-you.en.md
index 63b9e33a..f6e29717 100644
--- a/subjects/who-are-you.en.md
+++ b/subjects/who-are-you.en.md
@@ -1,6 +1,6 @@
-# who-are-you
+## who-are-you
-## Instructions
+### Instructions
"You just woke up in a dark alley...
You can not remember who you are...
diff --git a/subjects/who-are-you.fr.md b/subjects/who-are-you.fr.md
index 441e6f63..0b6aa9dd 100644
--- a/subjects/who-are-you.fr.md
+++ b/subjects/who-are-you.fr.md
@@ -1,6 +1,6 @@
-# who-are-you
+## who-are-you
-## Instructions
+### Instructions
"Vous venez de vous réveillez dans une allée sombre...
Vous n'arrivez pas à vous souvenir qui vous êtes...
From 1477f9303ec39160fb15ea0dc2b00bfda0f52394 Mon Sep 17 00:00:00 2001
From: Clement Denis
Date: Wed, 24 Apr 2019 18:20:39 +0100
Subject: [PATCH 69/71] rename previous and cleanup doubles
---
subjects/{abort.md => abort.en.md} | 0
subjects/{activebits.md => activebits.en.md} | 0
.../{alphamirror.md => alphamirror.en.md} | 0
subjects/{bool.md => bool.en.md} | 0
...pplybylevel.md => btreeapplybylevel.en.md} | 0
...reedeletenode.md => btreedeletenode.en.md} | 0
.../{btreeisbinary.md => btreeisbinary.en.md} | 0
...reelevelcount.md => btreelevelcount.en.md} | 0
subjects/{btreemax.md => btreemax.en.md} | 0
subjects/{btreemin.md => btreemin.en.md} | 0
...reetransplant.md => btreetransplant.en.md} | 0
subjects/{cat.md => cat.en.md} | 0
...atzcountdown.md => collatzcountdown.en.md} | 0
subjects/{comcheck.md => comcheck.en.md} | 0
subjects/{compact.md => compact.en.md} | 0
subjects/{countdown.md => countdown.en.md} | 0
subjects/{createelem.md => createelem.en.md} | 0
.../{dispfirstpar.md => dispfirstpar.en.md} | 0
.../{displastpar.md => displastpar.en.md} | 0
subjects/{displaya.md => displaya.en.md} | 0
.../{displayalpham.md => displayalpham.en.md} | 0
.../{displayalrevm.md => displayalrevm.en.md} | 0
.../{displayfile.md => displayfile.en.md} | 0
subjects/{displayz.md => displayz.en.md} | 0
subjects/{enigma.md => enigma.en.md} | 0
subjects/{firstword.md => firstword.en.md} | 0
subjects/{fixthemain.md => fixthemain.en.md} | 0
subjects/{hello.md => hello.en.md} | 0
subjects/{inter.md => inter.en.md} | 0
subjects/join.md | 43 -------
subjects/{lastword.md => lastword.en.md} | 0
subjects/listat.md | 60 ----------
subjects/listclear.md | 77 -------------
subjects/listfind.md | 64 -----------
subjects/listforeach.md | 65 -----------
subjects/listforeachif.md | 105 ------------------
subjects/listlast.md | 58 ----------
subjects/listmerge.md | 78 -------------
subjects/listpushback.md | 60 ----------
subjects/listpushfront.md | 60 ----------
.../{listpushpara.md => listpushpara.en.md} | 0
subjects/listremoveif.md | 99 -----------------
subjects/listreverse.md | 65 -----------
subjects/listsize.md | 56 ----------
subjects/listsort.md | 89 ---------------
subjects/{max.md => max.en.md} | 0
subjects/{onlya.md => onlya.en.md} | 0
subjects/{onlyz.md => onlyz.en.md} | 0
subjects/{pilot.md => pilot.en.md} | 0
subjects/{point.md => point.en.md} | 0
subjects/{printbits.md => printbits.en.md} | 0
subjects/{rectangle.md => rectangle.en.md} | 0
.../{repeatalpha.md => repeatalpha.en.md} | 0
.../{reversebits.md => reversebits.en.md} | 0
subjects/{rot13.md => rot13.en.md} | 0
subjects/{rot14.md => rot14.en.md} | 0
.../{searchreplace.md => searchreplace.en.md} | 0
subjects/sortedlistmerge.md | 71 ------------
subjects/sortlistinsert.md | 87 ---------------
subjects/strlen.md | 24 ----
subjects/{swapbits.md => swapbits.en.md} | 0
subjects/{switchcase.md => switchcase.en.md} | 0
subjects/{union.md => union.en.md} | 0
subjects/{unmatch.md => unmatch.en.md} | 0
subjects/{wdmatch.md => wdmatch.en.md} | 0
subjects/{ztail.md => ztail.en.md} | 0
66 files changed, 1161 deletions(-)
rename subjects/{abort.md => abort.en.md} (100%)
rename subjects/{activebits.md => activebits.en.md} (100%)
rename subjects/{alphamirror.md => alphamirror.en.md} (100%)
rename subjects/{bool.md => bool.en.md} (100%)
rename subjects/{btreeapplybylevel.md => btreeapplybylevel.en.md} (100%)
rename subjects/{btreedeletenode.md => btreedeletenode.en.md} (100%)
rename subjects/{btreeisbinary.md => btreeisbinary.en.md} (100%)
rename subjects/{btreelevelcount.md => btreelevelcount.en.md} (100%)
rename subjects/{btreemax.md => btreemax.en.md} (100%)
rename subjects/{btreemin.md => btreemin.en.md} (100%)
rename subjects/{btreetransplant.md => btreetransplant.en.md} (100%)
rename subjects/{cat.md => cat.en.md} (100%)
rename subjects/{collatzcountdown.md => collatzcountdown.en.md} (100%)
rename subjects/{comcheck.md => comcheck.en.md} (100%)
rename subjects/{compact.md => compact.en.md} (100%)
rename subjects/{countdown.md => countdown.en.md} (100%)
rename subjects/{createelem.md => createelem.en.md} (100%)
rename subjects/{dispfirstpar.md => dispfirstpar.en.md} (100%)
rename subjects/{displastpar.md => displastpar.en.md} (100%)
rename subjects/{displaya.md => displaya.en.md} (100%)
rename subjects/{displayalpham.md => displayalpham.en.md} (100%)
rename subjects/{displayalrevm.md => displayalrevm.en.md} (100%)
rename subjects/{displayfile.md => displayfile.en.md} (100%)
rename subjects/{displayz.md => displayz.en.md} (100%)
rename subjects/{enigma.md => enigma.en.md} (100%)
rename subjects/{firstword.md => firstword.en.md} (100%)
rename subjects/{fixthemain.md => fixthemain.en.md} (100%)
rename subjects/{hello.md => hello.en.md} (100%)
rename subjects/{inter.md => inter.en.md} (100%)
delete mode 100644 subjects/join.md
rename subjects/{lastword.md => lastword.en.md} (100%)
delete mode 100644 subjects/listat.md
delete mode 100644 subjects/listclear.md
delete mode 100644 subjects/listfind.md
delete mode 100644 subjects/listforeach.md
delete mode 100644 subjects/listforeachif.md
delete mode 100644 subjects/listlast.md
delete mode 100644 subjects/listmerge.md
delete mode 100644 subjects/listpushback.md
delete mode 100644 subjects/listpushfront.md
rename subjects/{listpushpara.md => listpushpara.en.md} (100%)
delete mode 100644 subjects/listremoveif.md
delete mode 100644 subjects/listreverse.md
delete mode 100644 subjects/listsize.md
delete mode 100644 subjects/listsort.md
rename subjects/{max.md => max.en.md} (100%)
rename subjects/{onlya.md => onlya.en.md} (100%)
rename subjects/{onlyz.md => onlyz.en.md} (100%)
rename subjects/{pilot.md => pilot.en.md} (100%)
rename subjects/{point.md => point.en.md} (100%)
rename subjects/{printbits.md => printbits.en.md} (100%)
rename subjects/{rectangle.md => rectangle.en.md} (100%)
rename subjects/{repeatalpha.md => repeatalpha.en.md} (100%)
rename subjects/{reversebits.md => reversebits.en.md} (100%)
rename subjects/{rot13.md => rot13.en.md} (100%)
rename subjects/{rot14.md => rot14.en.md} (100%)
rename subjects/{searchreplace.md => searchreplace.en.md} (100%)
delete mode 100644 subjects/sortedlistmerge.md
delete mode 100644 subjects/sortlistinsert.md
delete mode 100644 subjects/strlen.md
rename subjects/{swapbits.md => swapbits.en.md} (100%)
rename subjects/{switchcase.md => switchcase.en.md} (100%)
rename subjects/{union.md => union.en.md} (100%)
rename subjects/{unmatch.md => unmatch.en.md} (100%)
rename subjects/{wdmatch.md => wdmatch.en.md} (100%)
rename subjects/{ztail.md => ztail.en.md} (100%)
diff --git a/subjects/abort.md b/subjects/abort.en.md
similarity index 100%
rename from subjects/abort.md
rename to subjects/abort.en.md
diff --git a/subjects/activebits.md b/subjects/activebits.en.md
similarity index 100%
rename from subjects/activebits.md
rename to subjects/activebits.en.md
diff --git a/subjects/alphamirror.md b/subjects/alphamirror.en.md
similarity index 100%
rename from subjects/alphamirror.md
rename to subjects/alphamirror.en.md
diff --git a/subjects/bool.md b/subjects/bool.en.md
similarity index 100%
rename from subjects/bool.md
rename to subjects/bool.en.md
diff --git a/subjects/btreeapplybylevel.md b/subjects/btreeapplybylevel.en.md
similarity index 100%
rename from subjects/btreeapplybylevel.md
rename to subjects/btreeapplybylevel.en.md
diff --git a/subjects/btreedeletenode.md b/subjects/btreedeletenode.en.md
similarity index 100%
rename from subjects/btreedeletenode.md
rename to subjects/btreedeletenode.en.md
diff --git a/subjects/btreeisbinary.md b/subjects/btreeisbinary.en.md
similarity index 100%
rename from subjects/btreeisbinary.md
rename to subjects/btreeisbinary.en.md
diff --git a/subjects/btreelevelcount.md b/subjects/btreelevelcount.en.md
similarity index 100%
rename from subjects/btreelevelcount.md
rename to subjects/btreelevelcount.en.md
diff --git a/subjects/btreemax.md b/subjects/btreemax.en.md
similarity index 100%
rename from subjects/btreemax.md
rename to subjects/btreemax.en.md
diff --git a/subjects/btreemin.md b/subjects/btreemin.en.md
similarity index 100%
rename from subjects/btreemin.md
rename to subjects/btreemin.en.md
diff --git a/subjects/btreetransplant.md b/subjects/btreetransplant.en.md
similarity index 100%
rename from subjects/btreetransplant.md
rename to subjects/btreetransplant.en.md
diff --git a/subjects/cat.md b/subjects/cat.en.md
similarity index 100%
rename from subjects/cat.md
rename to subjects/cat.en.md
diff --git a/subjects/collatzcountdown.md b/subjects/collatzcountdown.en.md
similarity index 100%
rename from subjects/collatzcountdown.md
rename to subjects/collatzcountdown.en.md
diff --git a/subjects/comcheck.md b/subjects/comcheck.en.md
similarity index 100%
rename from subjects/comcheck.md
rename to subjects/comcheck.en.md
diff --git a/subjects/compact.md b/subjects/compact.en.md
similarity index 100%
rename from subjects/compact.md
rename to subjects/compact.en.md
diff --git a/subjects/countdown.md b/subjects/countdown.en.md
similarity index 100%
rename from subjects/countdown.md
rename to subjects/countdown.en.md
diff --git a/subjects/createelem.md b/subjects/createelem.en.md
similarity index 100%
rename from subjects/createelem.md
rename to subjects/createelem.en.md
diff --git a/subjects/dispfirstpar.md b/subjects/dispfirstpar.en.md
similarity index 100%
rename from subjects/dispfirstpar.md
rename to subjects/dispfirstpar.en.md
diff --git a/subjects/displastpar.md b/subjects/displastpar.en.md
similarity index 100%
rename from subjects/displastpar.md
rename to subjects/displastpar.en.md
diff --git a/subjects/displaya.md b/subjects/displaya.en.md
similarity index 100%
rename from subjects/displaya.md
rename to subjects/displaya.en.md
diff --git a/subjects/displayalpham.md b/subjects/displayalpham.en.md
similarity index 100%
rename from subjects/displayalpham.md
rename to subjects/displayalpham.en.md
diff --git a/subjects/displayalrevm.md b/subjects/displayalrevm.en.md
similarity index 100%
rename from subjects/displayalrevm.md
rename to subjects/displayalrevm.en.md
diff --git a/subjects/displayfile.md b/subjects/displayfile.en.md
similarity index 100%
rename from subjects/displayfile.md
rename to subjects/displayfile.en.md
diff --git a/subjects/displayz.md b/subjects/displayz.en.md
similarity index 100%
rename from subjects/displayz.md
rename to subjects/displayz.en.md
diff --git a/subjects/enigma.md b/subjects/enigma.en.md
similarity index 100%
rename from subjects/enigma.md
rename to subjects/enigma.en.md
diff --git a/subjects/firstword.md b/subjects/firstword.en.md
similarity index 100%
rename from subjects/firstword.md
rename to subjects/firstword.en.md
diff --git a/subjects/fixthemain.md b/subjects/fixthemain.en.md
similarity index 100%
rename from subjects/fixthemain.md
rename to subjects/fixthemain.en.md
diff --git a/subjects/hello.md b/subjects/hello.en.md
similarity index 100%
rename from subjects/hello.md
rename to subjects/hello.en.md
diff --git a/subjects/inter.md b/subjects/inter.en.md
similarity index 100%
rename from subjects/inter.md
rename to subjects/inter.en.md
diff --git a/subjects/join.md b/subjects/join.md
deleted file mode 100644
index 2c88c853..00000000
--- a/subjects/join.md
+++ /dev/null
@@ -1,43 +0,0 @@
-## join
-
-### Instructions
-
-Write a function, Join, that returns the elements of a slice strings (arstr) join together in one string. Using the string 'sep' as a separator between each element of the array
-
-The function must have the next signature.
-
-### Expected function
-
-```go
-func Join(arstr []string, sep string) string {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- student ".."
-)
-
-func main() {
- arrStr := []string{"hello", "how", "are", "you"}
- joined := student.Join(arrStr, "--")
- fmt.Println(joined)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/student/join$ go build
-student@ubuntu:~/student/join$ ./join
-hello--how--are--you
-student@ubuntu:~/student/join$
-```
diff --git a/subjects/lastword.md b/subjects/lastword.en.md
similarity index 100%
rename from subjects/lastword.md
rename to subjects/lastword.en.md
diff --git a/subjects/listat.md b/subjects/listat.md
deleted file mode 100644
index f71b4a60..00000000
--- a/subjects/listat.md
+++ /dev/null
@@ -1,60 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListAt` that haves one pointer to the list, `l`, and an `int` as parameters. This function should print a `Node` of the linked list, depending on the number, `nbr`.
-
-- In case of error it should print `nil`
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-
-func ListAt(l *Node, nbr int) *Node{
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &Node{}
-
- ListPushBack(link, "hello")
- ListPushBack(link, "how are")
- ListPushBack(link, "you")
- ListPushBack(link, 1)
-
- fmt.Println()
-
- fmt.Println(ListAt(link, 3).Data)
- fmt.Println(ListAt(link, 1).Data)
- fmt.Println(ListAt(link, 7))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-you
-hello
-
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listclear.md b/subjects/listclear.md
deleted file mode 100644
index 5c059197..00000000
--- a/subjects/listclear.md
+++ /dev/null
@@ -1,77 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListClear` that delets all `nodes` from a linked list, deleting the link between the list.
-
-- Tip: assign the list's pointer to nil
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListClear(l *List) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-type List = piscine.List
-type Node = piscine.Node
-
-func PrintList(l *List) {
- link := l.Head
- for link != nil {
- fmt.Print(link.Data, " -> ")
- link = link.Next
- }
- fmt.Println(nil)
-}
-
-func main() {
- link := &List{}
-
- piscine.ListPushBack(link, "I")
- piscine.ListPushBack(link, 1)
- piscine.ListPushBack(link, "something")
- piscine.ListPushBack(link, 2)
-
- fmt.Println("------list------")
- PrintList(link)
- piscine.ListClear(link)
- fmt.Println("------updated list------")
- PrintList(link)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-------list------
-I -> 1 -> something -> 2 ->
-------updated list------
-
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listfind.md b/subjects/listfind.md
deleted file mode 100644
index e4023cff..00000000
--- a/subjects/listfind.md
+++ /dev/null
@@ -1,64 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListFind` that returns the value of the first link that the function in the arguments its equal.
-
-- For this you shoud use the function `CompStr`.
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func CompStr(l *list) bool {
-
-}
-
-func ListFind(l *List, comp func(l *List) bool) *interface{} {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &List{}
-
- piscine.ListPushBack(link, 1)
- piscine.ListPushBack(link, "hello")
- piscine.ListPushBack(link, "hello2")
- piscine.ListPushBack(link, "hello3")
-
- fmt.Println(piscine.ListFind(link, CompStr))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-hello
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listforeach.md b/subjects/listforeach.md
deleted file mode 100644
index 7dbfd9b2..00000000
--- a/subjects/listforeach.md
+++ /dev/null
@@ -1,65 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListForEach` that applies a function given as argument to the information within each of the list's links.
-
-- The function given as argument must have a pointer as argument: `l *list`
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListForEach(l *list, f func(l *list)) {
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &List{}
-
- piscine.ListPushBack(link, 1)
- piscine.ListPushBack(link, 2)
- piscine.ListPushBack(link, 3)
- piscine.ListPushBack(link, 4)
-
- piscine.ListForEach(link, piscine.ListReverse)
-
- for link.Head != nil {
- fmt.Println(link.Head.Data)
- link.Head = link.Head.Next
- }
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-4
-3
-2
-1
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listforeachif.md b/subjects/listforeachif.md
deleted file mode 100644
index 81589024..00000000
--- a/subjects/listforeachif.md
+++ /dev/null
@@ -1,105 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListForEachIf` that applies a function given as argument to the information within some links of the list.
-
-- For this you will have to create a function `CompStr`, that returns a `bool`, to compare each elemente of the linked list, to see if it is a string, and than apply the function in the argument of `ListForEachIf`.
-
-- The function given as argument as to have a pointer as argument: `l *list`.
-
-- Use pointers wen ever you can.
-
-### Expected function and structure
-
-```go
-type node struct {
- data interface{}
- next *node
-}
-
-type list struct {
- head *node
- tail *node
-}
-
-func CompStr(l *list) bool {
-
-}
-
-func ListForEachIf(l *list, f func(l *list), comp func(l *list) bool) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func PrintElem(l *list) {
- fmt.Println(l.head.data)
-}
-
-func StringToInt(l *list) {
- count := 1
- l.head.data = count
-}
-
-func PrintList(l *list) {
- m := l.head
- for m != nil {
- fmt.Print(m.data, " -> ")
- m = m.next
- }
-
- fmt.Print(l.tail)
-}
-
-func main() {
- link := &list{}
-
- piscine.ListPushBack(link, 1)
- piscine.ListPushBack(link, "hello")
- piscine.ListPushBack(link, 3)
- piscine.ListPushBack(link, "there")
- piscine.ListPushBack(link, 23)
- piscine.ListPushBack(link, "!")
- piscine.ListPushBack(link, 54)
-
- PrintAllList(link)
-
- fmt.Println()
- fmt.Println("--------function applied--------")
- piscine.ListForEachIf(link, PrintElem, CompStr)
-
- piscine.ListForEachIf(link, StringToInt, CompStr)
-
- fmt.Println("--------function applied--------")
- PrintAllList(link)
-
- fmt.Println()
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-1 -> hello -> 3 -> there -> 23 -> ! -> 54 ->
---------function applied--------
-hello
-there
-!
---------function applied--------
-1 -> 1 -> 3 -> 1 -> 23 -> 1 -> 54 ->
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listlast.md b/subjects/listlast.md
deleted file mode 100644
index c53d4df8..00000000
--- a/subjects/listlast.md
+++ /dev/null
@@ -1,58 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListLast` that returns the last element of the linked list.
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListLast(l *list) *list {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &list{}
- link2 := &list{}
-
- piscine.ListPushBack(link, "three")
- piscine.ListPushBack(link, 3)
- piscine.ListPushBack(link, "1")
-
- fmt.Println(piscine.ListLast(link).head)
- fmt.Println(piscine.ListLast(link2).head)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-&{1 }
-
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listmerge.md b/subjects/listmerge.md
deleted file mode 100644
index 49cafa93..00000000
--- a/subjects/listmerge.md
+++ /dev/null
@@ -1,78 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListMerge` that places elements of a list `l2` at the end of an other list `l1`.
-
-- You can't create new elements!
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type NodeL struct {
- Data interface{}
- Next *NodeL
-}
-
-type List struct {
- Head *NodeL
- Tail *NodeL
-}
-
-func listMerge(l1 *List, l2 *List) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- student ".."
-)
-
-func PrintList(l *List) {
- m := l.Head
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.Next
- }
-
- fmt.Print(nil)
- fmt.Println()
-}
-
-func main() {
- link := &List{}
- link2 := &List{}
-
- student.ListPushBack(link, "a")
- student.ListPushBack(link, "b")
- student.ListPushBack(link, "c")
- student.ListPushBack(link, "d")
-
- student.ListPushBack(link2, "e")
- student.ListPushBack(link2, "f")
- student.ListPushBack(link2, "g")
- student.ListPushBack(link2, "h")
-
- student.ListMerge(link, link2)
- PrintList(link)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/student/test$ go build
-student@ubuntu:~/student/test$ ./test
-a -> b -> c -> d -> e -> f -> g -> h ->
-student@ubuntu:~/student/test$
-```
diff --git a/subjects/listpushback.md b/subjects/listpushback.md
deleted file mode 100644
index eada7bf9..00000000
--- a/subjects/listpushback.md
+++ /dev/null
@@ -1,60 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListPushBack` that inserts a new element `Node` at the end of the list, using the structure `List`
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListPushBack(l *List, data interface{}) {
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
-
- link := &List{}
-
- piscine.ListPushBack(link, "Hello")
- piscine.ListPushBack(link, "man")
- piscine.ListPushBack(link, "how are you")
-
- for link.Head != nil {
- fmt.Println(link.Head.Data)
- link.Head = link.Head.Next
- }
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-Hello
-man
-how are you
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listpushfront.md b/subjects/listpushfront.md
deleted file mode 100644
index 5ef0ea07..00000000
--- a/subjects/listpushfront.md
+++ /dev/null
@@ -1,60 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListPushBack` that inserts a new element `node` at the beginning of the list using `list`
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListPushFront(l *list, data interface{}) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &list{}
-
- piscine.ListPushFront(link, "Hello")
- piscine.ListPushFront(link, "man")
- piscine.ListPushFront(link, "how are you")
-
- for link.head != nil {
- fmt.Println(link.head.data)
- link.head = link.head.next
- }
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-how are you
-man
-Hello
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listpushpara.md b/subjects/listpushpara.en.md
similarity index 100%
rename from subjects/listpushpara.md
rename to subjects/listpushpara.en.md
diff --git a/subjects/listremoveif.md b/subjects/listremoveif.md
deleted file mode 100644
index 04ee54ab..00000000
--- a/subjects/listremoveif.md
+++ /dev/null
@@ -1,99 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListRemoveIf` that removes all elements that are equal to the `data_ref` introduced in the argument of the function.
-
-- Use pointers wen ever you can.
-
-### Expected function and structure
-
-```go
-type NodeL struct {
- Data interface{}
- Next *NodeL
-}
-
-type List struct {
- Head *NodeL
- Tail *NodeL
-}
-
-func ListPushFront(l *List, data interface{}) {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func PrintList(l *List) {
- m := l.Head
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.Next
- }
-
- fmt.Print(nil)
- fmt.Println()
-}
-
-func main() {
- link := &List{}
- link2 := &List{}
- link3 := &List{}
-
-
- fmt.Println("----normal state----")
- student.ListPushBack(link2, 1)
- PrintList(link2)
- ListRemoveIf(link2, 1)
- fmt.Println("------answer-----")
- PrintList(link)
- fmt.Println()
-
- fmt.Println("----normal state----")
- student.ListPushBack(link, 1)
- student.ListPushBack(link, "Hello")
- student.ListPushBack(link, 1)
- student.ListPushBack(link, "There")
- student.ListPushBack(link, 1)
- student.ListPushBack(link, 1)
- student.ListPushBack(link, "How")
- student.ListPushBack(link, 1)
- student.ListPushBack(link, "are")
- student.ListPushBack(link, "you")
- student.ListPushBack(link, 1)
- PrintList(link)
-
- ListRemoveIf(link, 1)
- fmt.Println("------answer-----")
- PrintList(link)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/student/test$ go build
-student@ubuntu:~/student/test$ ./test
-----normal state----
-1 ->
-------answer-----
-
-
-----normal state----
-1 -> Hello -> 1 -> There -> 1 -> 1 -> How -> 1 -> are -> you -> 1 ->
-------answer-----
-Hello -> There -> How -> are -> you ->
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listreverse.md b/subjects/listreverse.md
deleted file mode 100644
index 0ca64fc0..00000000
--- a/subjects/listreverse.md
+++ /dev/null
@@ -1,65 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListReverse` that reverses the elements order of a given linked list.
-
-- Use pointers when ever you can
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListReverse(l *list) {
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &List{}
-
- listPushBack(link, 1)
- listPushBack(link, 2)
- listPushBack(link, 3)
- listPushBack(link, 4)
-
- listReverse(link)
-
- for link.Head != nil {
- fmt.Println(link.Head.Data)
- link.Head = link.Head.Next
- }
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-4
-3
-2
-1
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listsize.md b/subjects/listsize.md
deleted file mode 100644
index 2b48b3f8..00000000
--- a/subjects/listsize.md
+++ /dev/null
@@ -1,56 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListSize` that returns the number of elements in the list.
-
-### Expected function and structure
-
-```go
-type Node struct {
- Data interface{}
- Next *Node
-}
-
-type List struct {
- Head *Node
- Tail *Node
-}
-
-func ListSize(l *List) int {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func main() {
- link := &List{}
-
- piscine.ListPushFront(link, "Hello")
- piscine.ListPushFront(link, "2")
- piscine.ListPushFront(link, "you")
- piscine.ListPushFront(link, "man")
-
- fmt.Println(piscine.ListSize(link))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-4
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/listsort.md b/subjects/listsort.md
deleted file mode 100644
index 09401c9b..00000000
--- a/subjects/listsort.md
+++ /dev/null
@@ -1,89 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `ListSort` that sorts the linked list by ascending order.
-
-- This time you only will have the `Nodee` structure.
-
-- Try to use recursive.
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type Nodee struct {
- Data int
- Next *Nodee
-}
-
-func ListSort(l *NodeL) *NodeL {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- student ".."
-)
-
-//Prints the list
-func PrintList(l *Nodee) {
- m := l
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.next
- }
-
- fmt.Print(nil)
- fmt.Println()
-}
-
-//insert elements
-func listPushBack(l *Nodee, Data int) {
-
- n := &Nodee{}
- n.Data = Data
- n.next = nil
-
- if l == nil {
- l = n
- return
- }
-
- iterator := l
- for iterator.next != nil {
- iterator = iterator.next
- }
- iterator.next = n
-}
-
-func main() {
- link := &Nodee{}
-
- listPushBack(link, 5)
- listPushBack(link, 4)
- listPushBack(link, 3)
- listPushBack(link, 2)
- listPushBack(link, 1)
-
- PrintList(student.ListSort(link))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/student/test$ go build
-student@ubuntu:~/student/test$ ./test
-0 -> 1 -> 2 -> 3 -> 4 -> 5 ->
-student@ubuntu:~/student/test$
-```
diff --git a/subjects/max.md b/subjects/max.en.md
similarity index 100%
rename from subjects/max.md
rename to subjects/max.en.md
diff --git a/subjects/onlya.md b/subjects/onlya.en.md
similarity index 100%
rename from subjects/onlya.md
rename to subjects/onlya.en.md
diff --git a/subjects/onlyz.md b/subjects/onlyz.en.md
similarity index 100%
rename from subjects/onlyz.md
rename to subjects/onlyz.en.md
diff --git a/subjects/pilot.md b/subjects/pilot.en.md
similarity index 100%
rename from subjects/pilot.md
rename to subjects/pilot.en.md
diff --git a/subjects/point.md b/subjects/point.en.md
similarity index 100%
rename from subjects/point.md
rename to subjects/point.en.md
diff --git a/subjects/printbits.md b/subjects/printbits.en.md
similarity index 100%
rename from subjects/printbits.md
rename to subjects/printbits.en.md
diff --git a/subjects/rectangle.md b/subjects/rectangle.en.md
similarity index 100%
rename from subjects/rectangle.md
rename to subjects/rectangle.en.md
diff --git a/subjects/repeatalpha.md b/subjects/repeatalpha.en.md
similarity index 100%
rename from subjects/repeatalpha.md
rename to subjects/repeatalpha.en.md
diff --git a/subjects/reversebits.md b/subjects/reversebits.en.md
similarity index 100%
rename from subjects/reversebits.md
rename to subjects/reversebits.en.md
diff --git a/subjects/rot13.md b/subjects/rot13.en.md
similarity index 100%
rename from subjects/rot13.md
rename to subjects/rot13.en.md
diff --git a/subjects/rot14.md b/subjects/rot14.en.md
similarity index 100%
rename from subjects/rot14.md
rename to subjects/rot14.en.md
diff --git a/subjects/searchreplace.md b/subjects/searchreplace.en.md
similarity index 100%
rename from subjects/searchreplace.md
rename to subjects/searchreplace.en.md
diff --git a/subjects/sortedlistmerge.md b/subjects/sortedlistmerge.md
deleted file mode 100644
index 392e5a6d..00000000
--- a/subjects/sortedlistmerge.md
+++ /dev/null
@@ -1,71 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `SortedListMerge` that mereges two lists, `l1` and `l2`, but you have to join them in ascending order.
-
-- Tip each list as to be already sorted, and initialized with 0.
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type Nodee struct {
- Data interface{}
- Next *Nodee
-}
-
-func SortedListMerge(l1 *Nodee, l2 *Nodee) *Nodee {
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-func PrintList(l *Nodee) {
- m := l
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.Next
- }
-
- fmt.Print(nil)
- fmt.Println()
-}
-
-func main() {
- link := &Nodee{}
- link2 := &Nodee{}
-
- piscine.ListPushBack(link, "5")
- piscine.ListPushBack(link, "3")
- piscine.ListPushBack(link, "7")
-
- piscine.ListPushBack(link2, "1")
- piscine.ListPushBack(link2, "-2")
- piscine.ListPushBack(link2, "4")
- piscine.ListPushBack(link2, "6")
-
- PrintList(SortedListMerge(link, link2))
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
--2 -> 0 -> 0 -> 1 -> 3 -> 4 -> 5 -> 6 -> 7 ->
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/sortlistinsert.md b/subjects/sortlistinsert.md
deleted file mode 100644
index 09340e70..00000000
--- a/subjects/sortlistinsert.md
+++ /dev/null
@@ -1,87 +0,0 @@
-## listpushback
-
-### Instructions
-
-Write a function `SortListInsert` that inserts `Data_ref` in the linked list, but it as to remain sorted in ascending order.
-
-- The list as to be alredy sorted.
-
-- Use pointers when ever you can.
-
-### Expected function and structure
-
-```go
-type Nodee struct {
- Data int
- Next *Nodee
-}
-
-func SortListInsert(l *Nodee, Data_ref int) *Nodee{
-
-}
-```
-
-### Usage
-
-Here is a possible [program](TODO-LINK) to test your function :
-
-```go
-package main
-
-import (
- "fmt"
- piscine ".."
-)
-
-//Prints the list
-func PrintList(l *Nodee) {
- m := l
- for m != nil {
- fmt.Print(m.Data, " -> ")
- m = m.Next
- }
- fmt.Print(nil)
- fmt.Println()
-}
-
-//insert elements
-func listPushBack(l *Nodee, Data int) {
- n := &Nodee{}
- n.Data = Data
- n.Next = nil
- if l == nil {
- l = n
- return
- }
- iterator := l
- for iterator.Next != nil {
- iterator = iterator.Next
- }
- iterator.Next = n
-}
-
-func main() {
-
- link := &Nodee{}
-
- listPushBack(link, 1)
- listPushBack(link, 4)
- listPushBack(link, 9)
-
- PrintList(link)
-
- link = sortListInsert(link, -2)
- link = sortListInsert(link, 2)
- PrintList(link)
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
--2 -> 0 -> 1 -> 2 -> 4 -> 9 ->
-lee@lee:~/Documents/work/day11/11-16-sortlistinsert/so
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/strlen.md b/subjects/strlen.md
deleted file mode 100644
index f129f9f6..00000000
--- a/subjects/strlen.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## strlen
-
-### Instructions
-
-Write a function that returns the length of a string.
-
-- `len` is forbidden
-
-### Expected function and structure
-
-```go
-func Strlen(str string) int {
-
-}
-```
-
-And its output :
-
-```console
-student@ubuntu:~/piscine/test$ go build
-student@ubuntu:~/piscine/test$ ./test
-4
-student@ubuntu:~/piscine/test$
-```
diff --git a/subjects/swapbits.md b/subjects/swapbits.en.md
similarity index 100%
rename from subjects/swapbits.md
rename to subjects/swapbits.en.md
diff --git a/subjects/switchcase.md b/subjects/switchcase.en.md
similarity index 100%
rename from subjects/switchcase.md
rename to subjects/switchcase.en.md
diff --git a/subjects/union.md b/subjects/union.en.md
similarity index 100%
rename from subjects/union.md
rename to subjects/union.en.md
diff --git a/subjects/unmatch.md b/subjects/unmatch.en.md
similarity index 100%
rename from subjects/unmatch.md
rename to subjects/unmatch.en.md
diff --git a/subjects/wdmatch.md b/subjects/wdmatch.en.md
similarity index 100%
rename from subjects/wdmatch.md
rename to subjects/wdmatch.en.md
diff --git a/subjects/ztail.md b/subjects/ztail.en.md
similarity index 100%
rename from subjects/ztail.md
rename to subjects/ztail.en.md
From 0a558ba1ef8027a542ee13f3a17fa579089291c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Barthe=CC=81lemy=20de=20Mazenod?=
Date: Wed, 24 Apr 2019 18:16:25 +0100
Subject: [PATCH 70/71] object attribute done
---
docs/object-attribute-system.md | 58 +++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 docs/object-attribute-system.md
diff --git a/docs/object-attribute-system.md b/docs/object-attribute-system.md
new file mode 100644
index 00000000..0a8cb27e
--- /dev/null
+++ b/docs/object-attribute-system.md
@@ -0,0 +1,58 @@
+# Object Attributes System
+
+> This document cover two notions, the edition of attributes and the impact it has relatively to the others Objects.
+
+## Edition of Attributes
+
+> There is no limit to how many attributes can be defined to an Object.
+
+In the "Object Attributes" section of the "Object Edit" Page, the first row is a form to create and append a new attribute. It requires two elements, the name of the attribute and its type (`String`, `Number`, `Boolean`, `Array`, `Object`, `Function`, `Null`). Click 'Add' to create the attribute.
+
+> Within a same Object, each attribute's name must be uniq.
+
+Once created, the new attributes appears right bellow and the ability to associate a value to it is now available. Depending on the type of the attribute, the interface will vary.
+
+- String value input is type String.
+- Number value input is type Number.
+- Booleans value input appears as a switch, true by default.
+- Arrays and Objects content are hideable / showable via the "Show/Hide content" button on the right of the attribute. There is no limit on the depth of Object/Array, however, after a certain level, the interface will start to feel narrow.
+- String value input is type String.
+- Null will not display any input.
+- Function will offer to select from all available functions, save on select.
+
+Any attribute can be delete by clicking on the 'trash' icon on the right hand of it.
+
+Here an example of how the section looks like.
+![object-attributes](https://user-images.githubusercontent.com/15313830/56677487-88675600-66b8-11e9-9781-26dc0ee6301d.png)
+
+## Attributes and RelationShips
+
+When an attributes is set to an Object, other Objects, associated to this particular Object, will have access to it. Which means that, if an Object A is added as a child of an Object B, A will embed its attributes within the instance of B.
+
+Object's attributes follow a hierarchy when associated to an other Object.
+The Original Attributes of a child, the ones defined in the original Object are the weakest ones. A Children Attribute is applied to all the children and overload the Original Attributes. Finally, child attribute is the strongest one, it overlaod Original Attributes and Children Attributes.
+
+When an object and its relationship are resolved, the three structures ("attrs", "childrenAttrs", "childAttrs") are flattened.
+
+The following json shows how the next object would be resolved.
+
+```json
+{
+ "childrenAttrs": {
+ "xp": 800
+ },
+ "children": {
+ "printalphabet": {
+ "duration": 3600,
+ "xp": 800,
+ "isBonus": true
+ }
+ }
+}
+```
+
+Children
+![children](https://user-images.githubusercontent.com/15313830/56679319-b189e580-66bc-11e9-8f2a-3d51eb1486d4.png)
+
+Child
+![chilld-capture](https://user-images.githubusercontent.com/15313830/56679320-b189e580-66bc-11e9-90ab-c8f69f531876.png)
From fa23db5fc365269ea2f6d992e26d65a3f6b090f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment?=
Date: Thu, 25 Apr 2019 11:53:25 +0100
Subject: [PATCH 71/71] Update object-attribute-system.md
---
docs/object-attribute-system.md | 118 ++++++++++++++++++++++++++++++--
1 file changed, 111 insertions(+), 7 deletions(-)
diff --git a/docs/object-attribute-system.md b/docs/object-attribute-system.md
index 0a8cb27e..8aea0fc1 100644
--- a/docs/object-attribute-system.md
+++ b/docs/object-attribute-system.md
@@ -8,7 +8,7 @@
In the "Object Attributes" section of the "Object Edit" Page, the first row is a form to create and append a new attribute. It requires two elements, the name of the attribute and its type (`String`, `Number`, `Boolean`, `Array`, `Object`, `Function`, `Null`). Click 'Add' to create the attribute.
-> Within a same Object, each attribute's name must be uniq.
+> Within a same Object, each attribute's name must be unique.
Once created, the new attributes appears right bellow and the ability to associate a value to it is now available. Depending on the type of the attribute, the interface will vary.
@@ -30,17 +30,14 @@ Here an example of how the section looks like.
When an attributes is set to an Object, other Objects, associated to this particular Object, will have access to it. Which means that, if an Object A is added as a child of an Object B, A will embed its attributes within the instance of B.
Object's attributes follow a hierarchy when associated to an other Object.
-The Original Attributes of a child, the ones defined in the original Object are the weakest ones. A Children Attribute is applied to all the children and overload the Original Attributes. Finally, child attribute is the strongest one, it overlaod Original Attributes and Children Attributes.
+The **defaults attributes** of a child, the ones defined in the original Object are the weakest ones. A **children attribute** is applied to all the children and override the default attributes. Finally, **relation attribute** is the strongest one, it override Default Attributes and Children Attributes.
-When an object and its relationship are resolved, the three structures ("attrs", "childrenAttrs", "childAttrs") are flattened.
+When an object and its relationship are resolved, the three structures (`attrs`, `childrenAttrs`, `childAttrs`) are merged.
-The following json shows how the next object would be resolved.
+The following json shows how the object would be represented:
```json
{
- "childrenAttrs": {
- "xp": 800
- },
"children": {
"printalphabet": {
"duration": 3600,
@@ -56,3 +53,110 @@ Children
Child
![chilld-capture](https://user-images.githubusercontent.com/15313830/56679320-b189e580-66bc-11e9-90ab-c8f69f531876.png)
+
+## Detailed example
+
+Let's create a few `exercises` objects
+
+> swap
+
+```js
+{
+ "id": 12344,
+ "title": "swap",
+ "attrs": {
+ "language": "go",
+ "duration": 7200
+ }
+}
+```
+
+> printalphabet
+
+```js
+{
+ "id": 12345,
+ "title": "printalphabet-v2",
+ "attrs": {
+ "language": "go",
+ "duration": 3600
+ }
+}
+```
+
+We can now create a parent object that will reference them and link them.
+
+This allow you to specify the structuration of your pedagocial content.
+
+I'll make a quest that regroup those 2 exercises:
+
+> quest-03
+
+```js
+{
+ "id": 12346,
+ "title": "quest-03",
+ "attrs": {},
+ "childrenAttrs": {
+ "xp": 800,
+ "duration": 4800,
+ },
+ "children": {
+ "printalphabet": {
+ "ref": 12345,
+ "index": 0,
+ "attrs": {
+ "duration": 7200
+ }
+ },
+ "swap": {
+ "ref": 12344,
+ "index": 1,
+ "attrs": {}
+ }
+ }
+}
+```
+
+All done, now when rendering an object, attributes are merged like so:
+
+> rendered quest object
+
+```js
+{
+ "id": 12346,
+ "title": "quest-03",
+ "attrs": {},
+ "children": {
+ "printalphabet": {
+ "ref": 12345,
+ "index": 0,
+ "attrs": {
+ "language": "go",
+ "xp": 800,
+ "duration": 7200
+ }
+ },
+ "swap": {
+ "ref": 12344,
+ "index": 1,
+ "attrs": {
+ "language": "go",
+ "xp": 800,
+ "duration": 4800
+ }
+ }
+ }
+}
+```
+
+First we apply the **default attributes** from the referenced object.
+> Here `duration` and `language` are applied.
+
+Then we apply the **children attributes** to every child.
+> In this case we override every `duration` to 4800 and add the new `xp` attribute.
+
+After that we apply the **relation attributes**, that are the most specific and as such,
+override all others attributes.
+> In this case only the `printalphabet` relation had attributes and so we apply
+the given `duration` to the final merged object.