From 25dad2b1c8fe903ed626d1cbfcaf5d3a54597f17 Mon Sep 17 00:00:00 2001 From: Clement Denis Date: Tue, 23 Apr 2019 12:06:01 +0100 Subject: [PATCH] Change titles format `sed -i 's/^\(#\+\) /\1# /' *.md` --- subjects/abort.md | 8 ++++---- subjects/activebits.md | 8 ++++---- subjects/bool.md | 6 +++--- subjects/btreeapplybylevel.md | 8 ++++---- subjects/btreedeletenode.md | 8 ++++---- subjects/btreeisbinary.md | 8 ++++---- subjects/btreelevelcount.md | 8 ++++---- subjects/btreemax.md | 8 ++++---- subjects/btreemin.md | 8 ++++---- subjects/btreetransplant.md | 8 ++++---- subjects/cat.md | 6 +++--- subjects/collatzcountdown.md | 8 ++++---- subjects/comcheck.md | 8 ++++---- subjects/compact.md | 8 ++++---- subjects/countdown.md | 8 ++++---- subjects/createelem.md | 8 ++++---- subjects/dispfirstpar.md | 6 +++--- subjects/displastpar.md | 6 +++--- subjects/displaya.md | 8 ++++---- subjects/displayalpham.md | 4 ++-- subjects/displayalrevm.md | 4 ++-- subjects/displayfile.md | 6 +++--- subjects/displayz.md | 6 +++--- subjects/enigma.md | 8 ++++---- subjects/firstword.md | 6 +++--- subjects/fixthemain.md | 8 ++++---- subjects/hello.md | 8 ++++---- subjects/inter.md | 6 +++--- subjects/join.md | 8 ++++---- subjects/lastword.md | 4 ++-- subjects/listat.md | 8 ++++---- subjects/listclear.md | 8 ++++---- subjects/listfind.md | 8 ++++---- subjects/listforeach.md | 8 ++++---- subjects/listforeachif.md | 8 ++++---- subjects/listlast.md | 8 ++++---- subjects/listmerge.md | 8 ++++---- subjects/listpushback.md | 8 ++++---- subjects/listpushfront.md | 8 ++++---- subjects/listpushpara.md | 4 ++-- subjects/listremoveif.md | 8 ++++---- subjects/listreverse.md | 8 ++++---- subjects/listsize.md | 8 ++++---- subjects/listsort.md | 8 ++++---- subjects/max.md | 8 ++++---- subjects/onlya.md | 4 ++-- subjects/onlyz.md | 4 ++-- subjects/pilot.md | 6 +++--- subjects/point.md | 4 ++-- subjects/rectangle.md | 8 ++++---- subjects/repeatalpha.md | 4 ++-- subjects/reversebits.md | 4 ++-- subjects/rot13.md | 6 +++--- subjects/rot14.md | 8 ++++---- subjects/searchreplace.md | 6 +++--- subjects/sortedlistmerge.md | 8 ++++---- subjects/sortlistinsert.md | 8 ++++---- subjects/strlen.md | 6 +++--- subjects/swapbits.md | 4 ++-- subjects/switchcase.md | 6 +++--- subjects/union.md | 4 ++-- subjects/unmatch.md | 8 ++++---- subjects/wdmatch.md | 6 +++--- subjects/ztail.md | 4 ++-- 64 files changed, 218 insertions(+), 218 deletions(-) diff --git a/subjects/abort.md b/subjects/abort.md index ba029f93..52ef41bd 100644 --- a/subjects/abort.md +++ b/subjects/abort.md @@ -1,11 +1,11 @@ -# abort -## Instructions +## abort +### Instructions Write a function that returns the the value in the middle of 5 five arguments. This function must have the following signature. -## Expected function +### Expected function ```go func Abort(a, b, c, d, e int) int { @@ -14,7 +14,7 @@ func Abort(a, b, c, d, e int) int { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/activebits.md b/subjects/activebits.md index e23c6b41..7914ce74 100644 --- a/subjects/activebits.md +++ b/subjects/activebits.md @@ -1,11 +1,11 @@ -# activebits -## Instructions +## activebits +### Instructions Write a function, ActiveBitsthat, that returns the number of active bits (bits with the value 1) in the binary representation of an integer number. The function must have the next signature. -## Expected function +### Expected function ```go @@ -15,7 +15,7 @@ func ActiveBits(n int) uint { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/bool.md b/subjects/bool.md index 9b75f86c..96aa3114 100644 --- a/subjects/bool.md +++ b/subjects/bool.md @@ -1,6 +1,6 @@ # Boolean -## Instructions +### Instructions Create a `.go` file and copy the code below into our file @@ -36,11 +36,11 @@ func main() { } ``` -## Expected output +### Expected output ```go I have an even number of arguments ``` -## Or +### Or ```go I have an odd number of arguments ``` \ No newline at end of file diff --git a/subjects/btreeapplybylevel.md b/subjects/btreeapplybylevel.md index 410b518d..a2eae917 100644 --- a/subjects/btreeapplybylevel.md +++ b/subjects/btreeapplybylevel.md @@ -1,11 +1,11 @@ -# btreeapplybylevel -## Instructions +## btreeapplybylevel +### Instructions Write a function, BTreeApplyByLevel, that applies the function given by fn to each node of the tree given by root. This function must have the following signature. -## Expected function +### Expected function ```go func BTreeApplyByLevel(root *TreeNode, fn interface{}) { @@ -14,7 +14,7 @@ func BTreeApplyByLevel(root *TreeNode, fn interface{}) { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/btreedeletenode.md b/subjects/btreedeletenode.md index 7220eeed..33fc98c5 100644 --- a/subjects/btreedeletenode.md +++ b/subjects/btreedeletenode.md @@ -1,5 +1,5 @@ -# btreedeletenode -## Instructions +## btreedeletenode +### Instructions Write a function, BTreeDeleteNode, that deletes 'node' from the tree given by root. @@ -7,7 +7,7 @@ The resulting tree should still follow the binary search tree rules. This function must have the following signature. -## Expected function +### Expected function ```go func BTreeDeleteNode(root, node *TreeNode) *TreeNode { @@ -16,7 +16,7 @@ func BTreeDeleteNode(root, node *TreeNode) *TreeNode { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/btreeisbinary.md b/subjects/btreeisbinary.md index 8f58fa9b..f89e580f 100644 --- a/subjects/btreeisbinary.md +++ b/subjects/btreeisbinary.md @@ -1,11 +1,11 @@ -# btreeisbinary -## Instructions +## btreeisbinary +### Instructions Write a function, BTreeIsBinary, that returns true only if the tree given by root follows the binary search tree properties. This function must have the following signature. -## Expected function +### Expected function ```go func BTreeIsBinary(root *TreeNode) bool { @@ -14,7 +14,7 @@ func BTreeIsBinary(root *TreeNode) bool { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/btreelevelcount.md b/subjects/btreelevelcount.md index d3f8983c..8610e2a7 100644 --- a/subjects/btreelevelcount.md +++ b/subjects/btreelevelcount.md @@ -1,9 +1,9 @@ -# btreelevelcount -## Instructions +## btreelevelcount +### Instructions Write a function, BTreeLevelCount, that return the number of levels of the tree (height of the tree) -## Expected function +### Expected function ```go func BTreeLevelCount(root *piscine.TreeNode) int { @@ -12,7 +12,7 @@ func BTreeLevelCount(root *piscine.TreeNode) int { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/btreemax.md b/subjects/btreemax.md index 46ee38df..76ab4dd5 100644 --- a/subjects/btreemax.md +++ b/subjects/btreemax.md @@ -1,11 +1,11 @@ -# btreemax -## Instructions +## btreemax +### Instructions Write a function, BTreeMax, that returns the node with the maximum value in the tree given by root This function must have the following signature. -## Expected function +### Expected function ```go func BTreeMax(root *TreeNode) *TreeNode { @@ -14,7 +14,7 @@ func BTreeMax(root *TreeNode) *TreeNode { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/btreemin.md b/subjects/btreemin.md index 2371c0fe..6f5a43db 100644 --- a/subjects/btreemin.md +++ b/subjects/btreemin.md @@ -1,11 +1,11 @@ -# btreemin -## Instructions +## btreemin +### Instructions Write a function, BTreeMin, that returns the node with the minimum value in the tree given by root This function must have the following signature. -## Expected function +### Expected function ```go func BTreeMin(root *TreeNode) *TreeNode { @@ -14,7 +14,7 @@ func BTreeMin(root *TreeNode) *TreeNode { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/btreetransplant.md b/subjects/btreetransplant.md index 695fdc76..ff10f5b2 100644 --- a/subjects/btreetransplant.md +++ b/subjects/btreetransplant.md @@ -1,11 +1,11 @@ -# btreetransplant -## Instructions +## btreetransplant +### Instructions In order to move subtrees around within the binary search tree, write a function, BTreeTransplant, which replaces the subtree started by node with the node called 'rplc' in the tree given by root. This function must have the following signature. -## Expected function +### Expected function ```go func BTreeTransplant(root, node, rplc *TreeNode) *TreeNode { @@ -14,7 +14,7 @@ func BTreeTransplant(root, node, rplc *TreeNode) *TreeNode { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/cat.md b/subjects/cat.md index 57e7ccf5..681b933d 100644 --- a/subjects/cat.md +++ b/subjects/cat.md @@ -1,6 +1,6 @@ -# Cat +## Cat -## Instructions +### Instructions Write a program that does the same thing as the system's `cat` command-line. @@ -20,7 +20,7 @@ Write a program that does the same thing as the system's `cat` command-line. - In case of error it should print the error. -## Output: +### Output: ```console student@ubuntu:~/student/test$ go build diff --git a/subjects/collatzcountdown.md b/subjects/collatzcountdown.md index 72c0522c..d4aa2208 100644 --- a/subjects/collatzcountdown.md +++ b/subjects/collatzcountdown.md @@ -1,11 +1,11 @@ -# collatzcountdown -## Instructions +## collatzcountdown +### Instructions Write a function, CollatzCountdown, that returns the number of steps to reach 1 using the collatz countdown. The function must have the following signature. -## Expected function +### Expected function ```go func CollatzCountdown(start int) int { @@ -14,7 +14,7 @@ func CollatzCountdown(start int) int { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/comcheck.md b/subjects/comcheck.md index be897cfc..dcf010c7 100644 --- a/subjects/comcheck.md +++ b/subjects/comcheck.md @@ -1,19 +1,19 @@ -# ROT 14 +## ROT 14 -## Instructions +### Instructions Write a function `rot14` that returns the string within the parameter but transformed into a rot14 string. - If you not certain what we are talking about, there is a rot13 already. -## Expected function +### Expected function ```go func rot14(str string) string { } ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/compact.md b/subjects/compact.md index 20718a62..98b1c1bf 100644 --- a/subjects/compact.md +++ b/subjects/compact.md @@ -1,19 +1,19 @@ -# Compact +## Compact -## Instructions +### Instructions Write a function that will take a pointer to a array as parameter and overwrites any element that points to `nil`. - If you not sure what the function does. It exists in Ruby. -## Expected functions +### Expected functions ```go func Compact(ptr *[]string, length int) int { } ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/countdown.md b/subjects/countdown.md index 36980c8d..523a5082 100644 --- a/subjects/countdown.md +++ b/subjects/countdown.md @@ -1,13 +1,13 @@ -# countdown +## countdown -## Instructions +### Instructions Write a program that displays all digits in descending order, followed by a newline. -## Expected main and function for the program +### Expected main and function for the program -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/createelem.md b/subjects/createelem.md index 4743bf9c..91a03c34 100644 --- a/subjects/createelem.md +++ b/subjects/createelem.md @@ -1,10 +1,10 @@ -# createelem +## createelem -## Instructions +### Instructions Write a function `CreateElem` that creates a new element of type`Node`. -## Expected function and structure +### Expected function and structure ```go type Node struct { @@ -17,7 +17,7 @@ func CreateElem(n *Node, value int) { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/dispfirstpar.md b/subjects/dispfirstpar.md index 900cc3b3..86678679 100644 --- a/subjects/dispfirstpar.md +++ b/subjects/dispfirstpar.md @@ -1,10 +1,10 @@ -# dispfirstpar +## dispfirstpar -## Instructions +### Instructions Write a program that takes strings as arguments, and displays its first argument. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/displastpar.md b/subjects/displastpar.md index 22e15ac2..2cbc6625 100644 --- a/subjects/displastpar.md +++ b/subjects/displastpar.md @@ -1,10 +1,10 @@ -# displastpar +## displastpar -## Instructions +### Instructions Write a program that takes strings as arguments, and displays its last argument. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/displaya.md b/subjects/displaya.md index 4f2b30ba..55ba33f6 100644 --- a/subjects/displaya.md +++ b/subjects/displaya.md @@ -1,15 +1,15 @@ -# displaya +## displaya -## Instructions +### Instructions Write a program that takes a string, and displays the first 'a' character it encounters in it, followed by a newline. If there are no 'a' characters in the string, the program just writes a newline. If the number of parameters is not 1, the program displays 'a' followed by a newline. -## Expected main and function for the program +### Expected main and function for the program -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/displayalpham.md b/subjects/displayalpham.md index 45e4b70e..53aa98dd 100644 --- a/subjects/displayalpham.md +++ b/subjects/displayalpham.md @@ -1,5 +1,5 @@ -# displayalpham -## Instructions +## displayalpham +### Instructions Write a program that displays the alphabet, with even letters in uppercase, and odd letters in lowercase, followed by a newline. diff --git a/subjects/displayalrevm.md b/subjects/displayalrevm.md index 0cbe0f7b..b1f4fda8 100644 --- a/subjects/displayalrevm.md +++ b/subjects/displayalrevm.md @@ -1,5 +1,5 @@ -# displayalrevm -## Instructions +## displayalrevm +### Instructions Write a program that displays the alphabet in reverse, with even letters in uppercase, and odd letters in lowercase, followed by a newline. diff --git a/subjects/displayfile.md b/subjects/displayfile.md index df3df99d..74f74505 100644 --- a/subjects/displayfile.md +++ b/subjects/displayfile.md @@ -1,6 +1,6 @@ -# Display File +## Display File -## Instructions +### Instructions Write a program that displays, on the standard output, only the content of the file given as argument. @@ -12,7 +12,7 @@ Write a program that displays, on the standard output, only the content of the f - `File name missing`. - `Too many arguments`. -## Output: +### Output: ```console student@ubuntu:~/student/test$ go build diff --git a/subjects/displayz.md b/subjects/displayz.md index 6a4acd42..8bc3172e 100644 --- a/subjects/displayz.md +++ b/subjects/displayz.md @@ -1,13 +1,13 @@ -# displayz +## displayz -## Instructions +### Instructions Write a program that takes a string, and displays the first 'a' character it encounters in it, followed by a newline. If there are no 'a' characters in the string, the program just writes a newline. If the number of parameters is not 1, the program displays 'a' followed by a newline. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/enigma.md b/subjects/enigma.md index 27fb76c5..df2107c1 100644 --- a/subjects/enigma.md +++ b/subjects/enigma.md @@ -1,5 +1,5 @@ -# enigma -## Instructions +## enigma +### Instructions Write a function called `Enigma` that receives poiters to functions and move its values around to hide them @@ -7,7 +7,7 @@ This function will put a into c; c into d; d into b and b into a This function must have the following signature. -## Expected function +### Expected function ```go func Enigma(a ***int, b *int, c *******int, d ****int) { @@ -16,7 +16,7 @@ func Enigma(a ***int, b *int, c *******int, d ****int) { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/firstword.md b/subjects/firstword.md index fddd467c..3b5fd0f7 100644 --- a/subjects/firstword.md +++ b/subjects/firstword.md @@ -1,6 +1,6 @@ -# firstword +## firstword -## Instructions +### Instructions Write a program that takes a string and displays its first word, followed by a newline. @@ -10,7 +10,7 @@ Write a program that takes a string and displays its first word, followed by a n - If the number of parameters is not 1, or if there are no words, simply display a newline. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/fixthemain.md b/subjects/fixthemain.md index 414fbd94..3c843d68 100644 --- a/subjects/fixthemain.md +++ b/subjects/fixthemain.md @@ -1,10 +1,10 @@ -# Fix the Main +## Fix the Main -## Instructions +### Instructions Write and fix the folloing functions. -## Expected functions +### Expected functions ```go func PutStr(str string) { @@ -29,7 +29,7 @@ func IsDoorClose(ptrDoor *Door) bool { PutStr("Door is close ?") } ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/hello.md b/subjects/hello.md index 46ab635b..762f1d3b 100644 --- a/subjects/hello.md +++ b/subjects/hello.md @@ -1,12 +1,12 @@ -# hello +## hello -## Instructions +### Instructions Write a program that displays "Hello World!". -## Expected main and function for the program +### Expected main and function for the program -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/inter.md b/subjects/inter.md index f4cfca6a..a77623d3 100644 --- a/subjects/inter.md +++ b/subjects/inter.md @@ -1,6 +1,6 @@ -# switchcase +## switchcase -## Instructions +### Instructions Write a program that takes two strings and displays, without doubles, the characters that appear in both strings, in the order they appear in the first one. @@ -9,7 +9,7 @@ Write a program that takes two strings and displays, without doubles, the charac - If the number of arguments is not 2, the program displays `\n`. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/join.md b/subjects/join.md index 013afd3d..d5745b61 100644 --- a/subjects/join.md +++ b/subjects/join.md @@ -1,11 +1,11 @@ -# join -## Instructions +## 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 +### Expected function ```go @@ -15,7 +15,7 @@ func Join(arstr []string, sep string) string { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/lastword.md b/subjects/lastword.md index 4e3fabb0..fb5a6145 100644 --- a/subjects/lastword.md +++ b/subjects/lastword.md @@ -1,5 +1,5 @@ -# lastword -## Instructions +## lastword +### Instructions Write a program that takes a string and displays its last word, followed by a newline. diff --git a/subjects/listat.md b/subjects/listat.md index deb54634..83416cbc 100644 --- a/subjects/listat.md +++ b/subjects/listat.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/listclear.md b/subjects/listclear.md index d95a3fa4..0e57b258 100644 --- a/subjects/listclear.md +++ b/subjects/listclear.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/listfind.md b/subjects/listfind.md index cdb5244f..a22d3075 100644 --- a/subjects/listfind.md +++ b/subjects/listfind.md @@ -1,6 +1,6 @@ -# listpushback +## listpushback -## Instructions +### Instructions Write a function `ListFind` that returns the value of the first link that the function in the arguments its equal. @@ -8,7 +8,7 @@ Write a function `ListFind` that returns the value of the first link that the fu - Use pointers when 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/listforeach.md b/subjects/listforeach.md index fb392dd1..7dbfd9b2 100644 --- a/subjects/listforeach.md +++ b/subjects/listforeach.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/listforeachif.md b/subjects/listforeachif.md index 7cce19ad..cd5b146f 100644 --- a/subjects/listforeachif.md +++ b/subjects/listforeachif.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/listlast.md b/subjects/listlast.md index 329123bc..24503898 100644 --- a/subjects/listlast.md +++ b/subjects/listlast.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/listmerge.md b/subjects/listmerge.md index b9e153d6..dc8e1360 100644 --- a/subjects/listmerge.md +++ b/subjects/listmerge.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 NodeL 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/listpushback.md b/subjects/listpushback.md index f67f8e1e..8eaeb190 100644 --- a/subjects/listpushback.md +++ b/subjects/listpushback.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/listpushfront.md b/subjects/listpushfront.md index b1bc69fd..8b1f6832 100644 --- a/subjects/listpushfront.md +++ b/subjects/listpushfront.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/listpushpara.md b/subjects/listpushpara.md index d5c78e51..d7eca8f4 100644 --- a/subjects/listpushpara.md +++ b/subjects/listpushpara.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/listremoveif.md b/subjects/listremoveif.md index 2945f502..4d761f56 100644 --- a/subjects/listremoveif.md +++ b/subjects/listremoveif.md @@ -1,13 +1,13 @@ -# 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. - Use pointers wen ever you can. -## Expected function and structure +### Expected function and structure ```go type NodeL struct { @@ -25,7 +25,7 @@ func ListPushFront(l *List, data interface{}) { } ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/listreverse.md b/subjects/listreverse.md index 1f6092b7..68aaf79c 100644 --- a/subjects/listreverse.md +++ b/subjects/listreverse.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/listsize.md b/subjects/listsize.md index 6e913860..1dc61f57 100644 --- a/subjects/listsize.md +++ b/subjects/listsize.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/listsort.md b/subjects/listsort.md index ceeab510..e5b0cd6c 100644 --- a/subjects/listsort.md +++ b/subjects/listsort.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 Nodee struct { @@ -23,7 +23,7 @@ func ListSort(l *NodeL) *NodeL { } ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/max.md b/subjects/max.md index 7b2503f5..184d9686 100644 --- a/subjects/max.md +++ b/subjects/max.md @@ -1,11 +1,11 @@ -# max -## Instructions +## max +### Instructions Write a function, Max, that returns the maximum value in a slice of integers The function must have the next signature. -## Expected function +### Expected function ```go @@ -15,7 +15,7 @@ func Max(arr []int) int { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/onlya.md b/subjects/onlya.md index 87824967..b7e524b4 100644 --- a/subjects/onlya.md +++ b/subjects/onlya.md @@ -1,5 +1,5 @@ -# onlya +## onlya -## Instructions +### Instructions Write a program that displays a 'a' character on the standard output. \ No newline at end of file diff --git a/subjects/onlyz.md b/subjects/onlyz.md index 5adccad0..3cb74f4a 100644 --- a/subjects/onlyz.md +++ b/subjects/onlyz.md @@ -1,4 +1,4 @@ -# displayalpham -## Instructions +## displayalpham +### Instructions Write a program that displays a 'z' character on the standard output. \ No newline at end of file diff --git a/subjects/pilot.md b/subjects/pilot.md index fd9649e8..d4fa97b2 100644 --- a/subjects/pilot.md +++ b/subjects/pilot.md @@ -1,9 +1,9 @@ -# pilot -## Instructions +## pilot +### Instructions Write a go file so that the following program compile -## Usage +### Usage ```go package main diff --git a/subjects/point.md b/subjects/point.md index dc1cfeaa..fe66243e 100644 --- a/subjects/point.md +++ b/subjects/point.md @@ -1,6 +1,6 @@ # Point -## Instructions +### Instructions Create a `.go` file and copy the code below into our file @@ -24,7 +24,7 @@ func main() { } ``` -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/rectangle.md b/subjects/rectangle.md index 15598624..c4e1c8f3 100644 --- a/subjects/rectangle.md +++ b/subjects/rectangle.md @@ -1,6 +1,6 @@ -# Rectangle +## Rectangle -## Instructions +### Instructions Consider that a point is defined by its coordinates and that a rectangle is defined by the points of the upper left and lower right corners. @@ -17,7 +17,7 @@ is defined by the points of the upper left and lower right corners. - And calculates and prints the area of that rectangle you define. -## Expected main and function for the program +### Expected main and function for the program ```go func defineRectangle(ptr *point, n int) *rectangle { @@ -46,7 +46,7 @@ func main() { ``` -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/repeatalpha.md b/subjects/repeatalpha.md index 321f5134..a095f69f 100644 --- a/subjects/repeatalpha.md +++ b/subjects/repeatalpha.md @@ -1,5 +1,5 @@ -# repeatalpha -## Instructions +## repeatalpha +### Instructions Write a program called repeat_alpha that takes a string and display it repeating each alphabetical character as many times as its alphabetical index, diff --git a/subjects/reversebits.md b/subjects/reversebits.md index c0b9e01c..e135d5fc 100644 --- a/subjects/reversebits.md +++ b/subjects/reversebits.md @@ -1,5 +1,5 @@ -# reversebits -## Instructions +## reversebits +### Instructions Write a function that takes a byte, reverses it, bit by bit (like the example) and returns the result. diff --git a/subjects/rot13.md b/subjects/rot13.md index cb493970..f4f0ac15 100644 --- a/subjects/rot13.md +++ b/subjects/rot13.md @@ -1,6 +1,6 @@ -# rot13 +## rot13 -## Instructions +### Instructions Write a program that takes a string and displays it, replacing each of its letters by the letter 13 spaces ahead in alphabetical order. @@ -11,7 +11,7 @@ letters by the letter 13 spaces ahead in alphabetical order. - If the number of arguments is not 1, the program displays a newline. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/rot14.md b/subjects/rot14.md index be897cfc..dcf010c7 100644 --- a/subjects/rot14.md +++ b/subjects/rot14.md @@ -1,19 +1,19 @@ -# ROT 14 +## ROT 14 -## Instructions +### Instructions Write a function `rot14` that returns the string within the parameter but transformed into a rot14 string. - If you not certain what we are talking about, there is a rot13 already. -## Expected function +### Expected function ```go func rot14(str string) string { } ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/searchreplace.md b/subjects/searchreplace.md index 20a09d10..ee446b0a 100644 --- a/subjects/searchreplace.md +++ b/subjects/searchreplace.md @@ -1,6 +1,6 @@ -# searchreplace +## searchreplace -## Instructions +### Instructions Write a program that takes 3 arguments, the first arguments is a string in which to replace a letter (2nd argument) by another one (3rd argument). @@ -8,7 +8,7 @@ Write a program that takes 3 arguments, the first arguments is a string in whic - If the second argument is not contained in the first one (the string) then the program simply rewrites the string followed by a newline. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/sortedlistmerge.md b/subjects/sortedlistmerge.md index aac3f2ed..392e5a6d 100644 --- a/subjects/sortedlistmerge.md +++ b/subjects/sortedlistmerge.md @@ -1,6 +1,6 @@ -# listpushback +## listpushback -## Instructions +### Instructions Write a function `SortedListMerge` that mereges two lists, `l1` and `l2`, but you have to join them in ascending order. @@ -8,7 +8,7 @@ Write a function `SortedListMerge` that mereges two lists, `l1` and `l2`, but yo - Use pointers when ever you can. -## Expected function and structure +### Expected function and structure ```go type Nodee struct { @@ -21,7 +21,7 @@ func SortedListMerge(l1 *Nodee, l2 *Nodee) *Nodee { } ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/sortlistinsert.md b/subjects/sortlistinsert.md index 6f79c199..a300b1ce 100644 --- a/subjects/sortlistinsert.md +++ b/subjects/sortlistinsert.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 Nodee struct { @@ -21,7 +21,7 @@ func SortListInsert(l *Nodee, Data_ref int) *Nodee{ } ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/strlen.md b/subjects/strlen.md index 2bae4d4d..0ff967b2 100644 --- a/subjects/strlen.md +++ b/subjects/strlen.md @@ -1,12 +1,12 @@ -# strlen +## strlen -## Instructions +### Instructions Write a function that returns the length of a string. - `len` is forbidden -## Expected function and structure +### Expected function and structure ```go func Strlen(str string) int { diff --git a/subjects/swapbits.md b/subjects/swapbits.md index cffe7d56..32e9892b 100644 --- a/subjects/swapbits.md +++ b/subjects/swapbits.md @@ -1,5 +1,5 @@ -# swapbits -## Instructions +## swapbits +### Instructions Write a function that takes a byte, swaps its halves (like the example) and returns the result. diff --git a/subjects/switchcase.md b/subjects/switchcase.md index d5602164..0afa2843 100644 --- a/subjects/switchcase.md +++ b/subjects/switchcase.md @@ -1,6 +1,6 @@ -# switchcase +## switchcase -## Instructions +### Instructions Write a program that takes a string and reverses the case of all its letters. @@ -10,7 +10,7 @@ Write a program that takes a string and reverses the case of all its letters. - If the number of arguments is not 1, the program displays '\n'. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/union.md b/subjects/union.md index ceeba1f8..c6f0afcc 100644 --- a/subjects/union.md +++ b/subjects/union.md @@ -1,5 +1,5 @@ -# union -## Instructions +## union +### Instructions Write a program that takes two strings and displays, without doubles, the characters that appear in either one of the strings. diff --git a/subjects/unmatch.md b/subjects/unmatch.md index 26c61a8b..8728f188 100644 --- a/subjects/unmatch.md +++ b/subjects/unmatch.md @@ -1,11 +1,11 @@ -# join -## Instructions +## join +### Instructions Write a function, Unmatch, that returns the element of the slice (arr) that does not have a correspondent pair. The function must have the next signature. -## Expected function +### Expected function ```go @@ -15,7 +15,7 @@ func Unmatch(arr []int) int { ``` -## Usage +### Usage Here is a possible [program](TODO-LINK) to test your function : diff --git a/subjects/wdmatch.md b/subjects/wdmatch.md index cb24ecc0..22462de7 100644 --- a/subjects/wdmatch.md +++ b/subjects/wdmatch.md @@ -1,6 +1,6 @@ -# switchcase +## switchcase -## Instructions +### Instructions Write a program that takes two strings and checks whether it's possible to write the first string with characters from the second string, while respecting the order in which these characters appear in the second string. @@ -9,7 +9,7 @@ Write a program that takes two strings and checks whether it's possible to write - If the number of arguments is not 2, the program displays `\n`. -## Expected output +### Expected output ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/ztail.md b/subjects/ztail.md index 8c7c424a..dc7471e1 100644 --- a/subjects/ztail.md +++ b/subjects/ztail.md @@ -1,5 +1,5 @@ -# ztail -## Instructions +## ztail +### Instructions Write a program called ztail that does the same thing as the system command tail, but witch takes at least one file as argument.