diff --git a/subjects/abort.md b/subjects/abort.md index ba029f93c..52ef41bd5 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 e23c6b41e..7914ce74f 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 9b75f86c2..96aa31144 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 410b518d9..a2eae9175 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 7220eeed9..33fc98c50 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 8f58fa9b1..f89e580ff 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 d3f8983cc..8610e2a7b 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 46ee38df9..76ab4dd57 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 2371c0fee..6f5a43db2 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 695fdc76d..ff10f5b2f 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 57e7ccf59..681b933d2 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 72c0522cb..d4aa2208c 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 be897cfc1..dcf010c73 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 20718a62c..98b1c1bf7 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 36980c8d9..523a50822 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 4743bf9c4..91a03c342 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 900cc3b35..866786798 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 22e15ac21..2cbc66250 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 4f2b30ba8..55ba33f69 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 45e4b70e9..53aa98dd0 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 0cbe0f7b7..b1f4fda81 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 df3df99da..74f745057 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 6a4acd427..8bc3172e8 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 27fb76c5f..df2107c15 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 fddd467c9..3b5fd0f71 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 414fbd94f..3c843d689 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 46ab635b1..762f1d3bb 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 f4cfca6a5..a77623d3e 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 013afd3d3..d5745b618 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 4e3fabb08..fb5a6145a 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 deb546340..83416cbc8 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 d95a3fa4e..0e57b2587 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 cdb5244f2..a22d30758 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 fb392dd1d..7dbfd9b2f 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 7cce19ad6..cd5b146fe 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 329123bc7..245038984 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 b9e153d68..dc8e13605 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 f67f8e1e0..8eaeb190f 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 b1bc69fd9..8b1f68325 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 d5c78e518..d7eca8f44 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 2945f5028..4d761f56e 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 1f6092b71..68aaf79c1 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 6e9138603..1dc61f578 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 ceeab510e..e5b0cd6c2 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 7b2503f5c..184d96862 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 878249677..b7e524b45 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 5adccad00..3cb74f4af 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 fd9649e8b..d4fa97b2c 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 dc1cfeaa2..fe66243e3 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 155986247..c4e1c8f3b 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 321f5134d..a095f69f0 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 c0b9e01c6..e135d5fc5 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 cb4939701..f4f0ac15b 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 be897cfc1..dcf010c73 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 20a09d100..ee446b0a6 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 aac3f2ede..392e5a6da 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 6f79c1999..a300b1cee 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 2bae4d4d4..0ff967b25 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 cffe7d563..32e9892b9 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 d5602164c..0afa28432 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 ceeba1f8c..c6f0afcc4 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 26c61a8b4..8728f188a 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 cb24ecc05..22462de76 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 8c7c424a1..dc7471e13 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.