From e8e325ce4f4895f8fb3a728eb166c8004fa5b12a Mon Sep 17 00:00:00 2001 From: Augusto Date: Wed, 17 Apr 2019 09:55:36 +0100 Subject: [PATCH 1/2] readmes for binary trees exercises and some of quest 10 --- subjects/abort.md | 42 +++++++++++++++++ subjects/activebits.md | 43 ++++++++++++++++++ subjects/btreeapplybylevel.md | 48 +++++++++++++++++++ subjects/btreedeletenode.md | 60 ++++++++++++++++++++++++ subjects/btreeisbinary.md | 45 ++++++++++++++++++ subjects/btreelevelcount.md | 43 ++++++++++++++++++ subjects/btreemax.md | 46 +++++++++++++++++++ subjects/btreemin.md | 46 +++++++++++++++++++ subjects/btreetransplant.md | 51 +++++++++++++++++++++ subjects/collatzcountdown.md | 42 +++++++++++++++++ subjects/enigma.md | 86 +++++++++++++++++++++++++++++++++++ subjects/join.md | 44 ++++++++++++++++++ subjects/max.md | 44 ++++++++++++++++++ subjects/pilot.md | 26 +++++++++++ subjects/unmatch.md | 44 ++++++++++++++++++ subjects/ztail.md | 13 ++++++ 16 files changed, 723 insertions(+) create mode 100644 subjects/abort.md create mode 100644 subjects/activebits.md create mode 100644 subjects/btreeapplybylevel.md create mode 100644 subjects/btreedeletenode.md create mode 100644 subjects/btreeisbinary.md create mode 100644 subjects/btreelevelcount.md create mode 100644 subjects/btreemax.md create mode 100644 subjects/btreemin.md create mode 100644 subjects/btreetransplant.md create mode 100644 subjects/collatzcountdown.md create mode 100644 subjects/enigma.md create mode 100644 subjects/join.md create mode 100644 subjects/max.md create mode 100644 subjects/pilot.md create mode 100644 subjects/unmatch.md create mode 100644 subjects/ztail.md diff --git a/subjects/abort.md b/subjects/abort.md new file mode 100644 index 000000000..ba029f93c --- /dev/null +++ b/subjects/abort.md @@ -0,0 +1,42 @@ +# 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 + +```go +func Abort(a, b, c, d, e int) int { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + middle := student.Abort(2, 3, 8, 5, 7) + fmt.Println(middle) +} +``` + +And its output : + +```console +student@ubuntu:~/student/abort$ go build +student@ubuntu:~/student/abort$ ./abort +5 +student@ubuntu:~/student/abort$ +``` diff --git a/subjects/activebits.md b/subjects/activebits.md new file mode 100644 index 000000000..e23c6b41e --- /dev/null +++ b/subjects/activebits.md @@ -0,0 +1,43 @@ +# 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 + +```go + +func ActiveBits(n int) uint { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + nbits := student.ActiveBits(7) + fmt.Println(nbits) +} +``` + +And its output : + +```console +student@ubuntu:~/student/activebits$ go build +student@ubuntu:~/student/activebits$ ./activebits +10 +student@ubuntu:~/student/activebits$ +``` diff --git a/subjects/btreeapplybylevel.md b/subjects/btreeapplybylevel.md new file mode 100644 index 000000000..410b518d9 --- /dev/null +++ b/subjects/btreeapplybylevel.md @@ -0,0 +1,48 @@ +# 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 + +```go +func BTreeApplyByLevel(root *TreeNode, fn interface{}) { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + root := &student.TreeNode{Data: "4"} + student.BTreeInsertData(root, "1") + student.BTreeInsertData(root, "7") + student.BTreeInsertData(root, "5") + student.BTreeApplyByLevel(root, fmt.Println) +} +``` + +And its output : + +```console +student@ubuntu:~/student/btreeapplybylevel$ go build +student@ubuntu:~/student/btreeapplybylevel$ ./btreeapplybylevel +4 +1 +7 +5 +student@ubuntu:~/student/btreeapplybylevel$ +``` diff --git a/subjects/btreedeletenode.md b/subjects/btreedeletenode.md new file mode 100644 index 000000000..7220eeed9 --- /dev/null +++ b/subjects/btreedeletenode.md @@ -0,0 +1,60 @@ +# btreedeletenode +## Instructions + +Write a function, BTreeDeleteNode, that deletes 'node' from the tree given by root. + +The resulting tree should still follow the binary search tree rules. + +This function must have the following signature. + +## Expected function + +```go +func BTreeDeleteNode(root, node *TreeNode) *TreeNode { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + root := &student.TreeNode{Data: "4"} + student.BTreeInsertData(root, "1") + student.BTreeInsertData(root, "7") + student.BTreeInsertData(root, "5") + node := student.BTreeSearchItem(root, "4") + fmt.Println("Before delete:") + student.BTreeApplyInorder(root, fmt.Println) + root = student.BTreeDeleteNode(root, node) + fmt.Println("After delete:") + student.BTreeApplyInorder(root, fmt.Println) +} +``` + +And its output : + +```console +student@ubuntu:~/student/btreedeletenode$ go build +student@ubuntu:~/student/btreedeletenode$ ./btreedeletenode +Before delete: +1 +4 +5 +7 +After delete: +1 +5 +7 +student@ubuntu:~/student/btreedeletenode$ +``` diff --git a/subjects/btreeisbinary.md b/subjects/btreeisbinary.md new file mode 100644 index 000000000..8f58fa9b1 --- /dev/null +++ b/subjects/btreeisbinary.md @@ -0,0 +1,45 @@ +# 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 + +```go +func BTreeIsBinary(root *TreeNode) bool { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + root := &student.TreeNode{Data: "4"} + student.BTreeInsertData(root, "1") + student.BTreeInsertData(root, "7") + student.BTreeInsertData(root, "5") + fmt.Println(student.BTreeIsBinary(root)) +} +``` + +And its output : + +```console +student@ubuntu:~/student/btreeisbinary$ go build +student@ubuntu:~/student/btreeisbinary$ ./btreeisbinary +true +student@ubuntu:~/student/btreeisbinary$ +``` diff --git a/subjects/btreelevelcount.md b/subjects/btreelevelcount.md new file mode 100644 index 000000000..d3f8983cc --- /dev/null +++ b/subjects/btreelevelcount.md @@ -0,0 +1,43 @@ +# btreelevelcount +## Instructions + +Write a function, BTreeLevelCount, that return the number of levels of the tree (height of the tree) + +## Expected function + +```go +func BTreeLevelCount(root *piscine.TreeNode) int { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + root := &student.TreeNode{Data: "4"} + student.BTreeInsertData(root, "1") + student.BTreeInsertData(root, "7") + student.BTreeInsertData(root, "5") + fmt.Println(BTreeLevelCount(root)) +} +``` + +And its output : + +```console +student@ubuntu:~/student/btreesearchitem$ go build +student@ubuntu:~/student/btreesearchitem$ ./btreesearchitem +3 +student@ubuntu:~/student/btreesearchitem$ +``` diff --git a/subjects/btreemax.md b/subjects/btreemax.md new file mode 100644 index 000000000..46ee38df9 --- /dev/null +++ b/subjects/btreemax.md @@ -0,0 +1,46 @@ +# 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 + +```go +func BTreeMax(root *TreeNode) *TreeNode { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + root := &student.TreeNode{Data: "4"} + student.BTreeInsertData(root, "1") + student.BTreeInsertData(root, "7") + student.BTreeInsertData(root, "5") + max := student.BTreeMax(root) + fmt.Println(max.Data) +} +``` + +And its output : + +```console +student@ubuntu:~/student/btreemax$ go build +student@ubuntu:~/student/btreemax$ ./btreemax +7 +student@ubuntu:~/student/btreemax$ +``` diff --git a/subjects/btreemin.md b/subjects/btreemin.md new file mode 100644 index 000000000..2371c0fee --- /dev/null +++ b/subjects/btreemin.md @@ -0,0 +1,46 @@ +# 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 + +```go +func BTreeMin(root *TreeNode) *TreeNode { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + root := &student.TreeNode{Data: "4"} + student.BTreeInsertData(root, "1") + student.BTreeInsertData(root, "7") + student.BTreeInsertData(root, "5") + min := student.BTreeMin(root) + fmt.Println(min.Data) +} +``` + +And its output : + +```console +student@ubuntu:~/student/btreemin$ go build +student@ubuntu:~/student/btreemin$ ./btreemin +1 +student@ubuntu:~/student/btreemin$ +``` diff --git a/subjects/btreetransplant.md b/subjects/btreetransplant.md new file mode 100644 index 000000000..695fdc76d --- /dev/null +++ b/subjects/btreetransplant.md @@ -0,0 +1,51 @@ +# 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 + +```go +func BTreeTransplant(root, node, rplc *TreeNode) *TreeNode { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + root := &student.TreeNode{Data: "4"} + student.BTreeInsertData(root, "1") + student.BTreeInsertData(root, "7") + student.BTreeInsertData(root, "5") + node := student.BTreeSearchItem(root, "1") + replacement := &student.TreeNode{Data: "3"} + root = student.BTreeTransplant(root, node, replacement) + student.BTreeApplyInorder(root, fmt.Println) +} +``` + +And its output : + +```console +student@ubuntu:~/student/btreetransplant$ go build +student@ubuntu:~/student/btreetrandsplant$ ./btreetransplant +3 +4 +5 +7 +student@ubuntu:~/student/btreetrandsplant$ +``` diff --git a/subjects/collatzcountdown.md b/subjects/collatzcountdown.md new file mode 100644 index 000000000..72c0522cb --- /dev/null +++ b/subjects/collatzcountdown.md @@ -0,0 +1,42 @@ +# 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 + +```go +func CollatzCountdown(start int) int { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + steps := student.CollatzCountdown(12) + fmt.Println(steps) +} +``` + +And its output : + +```console +student@ubuntu:~/student/collatzcountdown$ go build +student@ubuntu:~/student/collatzcountdown$ ./collatzcountdown +10 +student@ubuntu:~/student/collatzcountdown$ +``` diff --git a/subjects/enigma.md b/subjects/enigma.md new file mode 100644 index 000000000..27fb76c5f --- /dev/null +++ b/subjects/enigma.md @@ -0,0 +1,86 @@ +# enigma +## Instructions + +Write a function called `Enigma` that receives poiters to functions and move its values around to hide them + +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 + +```go +func Enigma(a ***int, b *int, c *******int, d ****int) { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + x := 5 + y := &x + z := &y + a := &z + + w := 2 + b := &w + + u := 7 + e := &u + f := &e + g := &f + h := &g + i := &h + j := &i + c := &j + + k := 6 + l := &k + m := &l + n := &m + d := &n + + fmt.Println(***a) + fmt.Println(*b) + fmt.Println(*******c) + fmt.Println(****d) + + student.Enigma(a, b, c, d) + + fmt.Println("After using Enigma") + fmt.Println(***a) + fmt.Println(*b) + fmt.Println(*******c) + fmt.Println(****d) + +} +``` + +And its output : + +```console +student@ubuntu:~/student/enigma$ go build +student@ubuntu:~/student/enigma$ ./enigma +5 +2 +7 +6 +After using Enigma +2 +6 +5 +7 +student@ubuntu:~/student/enigma$ +``` diff --git a/subjects/join.md b/subjects/join.md new file mode 100644 index 000000000..013afd3d3 --- /dev/null +++ b/subjects/join.md @@ -0,0 +1,44 @@ +# 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/max.md b/subjects/max.md new file mode 100644 index 000000000..7b2503f5c --- /dev/null +++ b/subjects/max.md @@ -0,0 +1,44 @@ +# 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 + +```go + +func Max(arr []int) int { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + arrInt := []int{23, 123, 1, 11, 55, 93} + max := student.Max(arrInt) + fmt.Println(max +} +``` + +And its output : + +```console +student@ubuntu:~/student/max$ go build +student@ubuntu:~/student/max$ ./max +123 +student@ubuntu:~/student/max$ +``` diff --git a/subjects/pilot.md b/subjects/pilot.md new file mode 100644 index 000000000..fd9649e8b --- /dev/null +++ b/subjects/pilot.md @@ -0,0 +1,26 @@ +# pilot +## Instructions + +Write a go file so that the following program compile + +## Usage + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + var donnie student.Pilot + donnie.Name = "Donnie" + donnie.Life = 100.0 + donnie.Age = 24 + donnie.Aircraft = student.AIRCRAFT1 + + fmt.Println(donnie) +} +``` + diff --git a/subjects/unmatch.md b/subjects/unmatch.md new file mode 100644 index 000000000..26c61a8b4 --- /dev/null +++ b/subjects/unmatch.md @@ -0,0 +1,44 @@ +# 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 + +```go + +func Unmatch(arr []int) int { + +} + +``` + +## Usage + +Here is a possible [program](TODO-LINK) to test your function : + +```go +package main + +import ( + "fmt" + student ".." +) + +func main() { + arr := []int{1, 2, 3, 1, 2, 3, 4} + unmatch := student.Unmatch(arr) + fmt.Println(unmatch) +} +``` + +And its output : + +```console +student@ubuntu:~/student/unmatch$ go build +student@ubuntu:~/student/unmatch$ ./unmatch +4 +student@ubuntu:~/student/unmatch$ +``` diff --git a/subjects/ztail.md b/subjects/ztail.md new file mode 100644 index 000000000..8c7c424a1 --- /dev/null +++ b/subjects/ztail.md @@ -0,0 +1,13 @@ +# 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. + +The only option you have to handle is -c. This option will be used in all tests. + +For this program you can use the "os" package. + +For the program to pass the test you should follow the convention for the return code of program in Unix sistems (see os.Exit) + +For more information consult the man page for tail. + From b6618abea7b73eec8ca57fb9ba740968709aaa60 Mon Sep 17 00:00:00 2001 From: Augusto Date: Thu, 18 Apr 2019 12:14:34 +0100 Subject: [PATCH 2/2] more readmes for the exams --- subjects/displayalpham.md | 16 ++++++++++++++++ subjects/displayalrevm.md | 16 ++++++++++++++++ subjects/lastword.md | 28 ++++++++++++++++++++++++++++ subjects/onlyz.md | 4 ++++ subjects/repeatalpha.md | 29 +++++++++++++++++++++++++++++ subjects/reversebits.md | 20 ++++++++++++++++++++ subjects/swapbits.md | 20 ++++++++++++++++++++ subjects/union.md | 27 +++++++++++++++++++++++++++ 8 files changed, 160 insertions(+) create mode 100644 subjects/displayalpham.md create mode 100644 subjects/displayalrevm.md create mode 100644 subjects/lastword.md create mode 100644 subjects/onlyz.md create mode 100644 subjects/repeatalpha.md create mode 100644 subjects/reversebits.md create mode 100644 subjects/swapbits.md create mode 100644 subjects/union.md diff --git a/subjects/displayalpham.md b/subjects/displayalpham.md new file mode 100644 index 000000000..45e4b70e9 --- /dev/null +++ b/subjects/displayalpham.md @@ -0,0 +1,16 @@ +# displayalpham +## Instructions + +Write a program that displays the alphabet, with even letters in uppercase, and +odd letters in lowercase, followed by a newline. + +The function must have the next signature. + +Example : + +```console +student@ubuntu:~/student/displayalpham$ go build +student@ubuntu:~/student/displayalpham$ ./displayalpham | cat -e +aBcDeFgHiJkLmNoPqRsTuVwXyZ$ +student@ubuntu:~/student/displayalpham$ +``` diff --git a/subjects/displayalrevm.md b/subjects/displayalrevm.md new file mode 100644 index 000000000..0cbe0f7b7 --- /dev/null +++ b/subjects/displayalrevm.md @@ -0,0 +1,16 @@ +# 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. + +The function must have the next signature. + +Example : + +```console +student@ubuntu:~/student/displayalrevm$ go build +student@ubuntu:~/student/displayalrevm$ ./displayalrevm | cat -e +aBcDeFgHiJkLmNoPqRsTuVwXyZ$ +student@ubuntu:~/student/displayalrevm$ +``` diff --git a/subjects/lastword.md b/subjects/lastword.md new file mode 100644 index 000000000..4e3fabb08 --- /dev/null +++ b/subjects/lastword.md @@ -0,0 +1,28 @@ +# lastword +## Instructions + +Write a program that takes a string and displays its last word, followed by a +newline. + +A word is a section of string delimited by spaces/tabs or by the start/end of +the string. + +If the number of parameters is not 1, or if there are no words, simply display +a newline. + +Example : + +```console +student@ubuntu:~/student/lastword$ go build +student@ubuntu:~/student/lastword$ ./lastword "FOR PONY" | cat -e +PONY$ +student@ubuntu:~/student/lastword$ ./lastword "this ... is sparta, then again, maybe not" | cat -e +not$ +student@ubuntu:~/student/lastword$ ./lastword " " | cat -e +$ +student@ubuntu:~/student/lastword$ ./lastword "a" "b" | cat -e +$ +student@ubuntu:~/student/lastword$ ./lastword " lorem,ipsum " | cat -e +lorem,ipsum$ +student@ubuntu:~/student/lastword$ +``` diff --git a/subjects/onlyz.md b/subjects/onlyz.md new file mode 100644 index 000000000..5adccad00 --- /dev/null +++ b/subjects/onlyz.md @@ -0,0 +1,4 @@ +# displayalpham +## Instructions + +Write a program that displays a 'z' character on the standard output. \ No newline at end of file diff --git a/subjects/repeatalpha.md b/subjects/repeatalpha.md new file mode 100644 index 000000000..321f5134d --- /dev/null +++ b/subjects/repeatalpha.md @@ -0,0 +1,29 @@ +# 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, +followed by a newline. + +'a' becomes 'a', 'b' becomes 'bb', 'e' becomes 'eeeee', etc... + +Case remains unchanged. + +If the number of arguments is not 1, just display a newline. + +Examples: + +```console +student@ubuntu:~/student/repeatalpha$ go build +student@ubuntu:~/student/repeatalpha$ ./repeatalpha "abc" | cat -e +abbccc +student@ubuntu:~/student/repeatalpha$ ./repeatalpha "Alex." | cat -e +Alllllllllllleeeeexxxxxxxxxxxxxxxxxxxxxxxx.$ +student@ubuntu:~/student/repeatalpha$ ./repeatalpha "abacadaba 42!" | cat -e +abbacccaddddabba 42!$ +student@ubuntu:~/student/repeatalpha$ ./repeatalpha | cat -e +$ +student@ubuntu:~/student/repeatalpha$ ./repeatalpha "" | cat -e +$ +student@ubuntu:~/student/repeatalpha$ +``` diff --git a/subjects/reversebits.md b/subjects/reversebits.md new file mode 100644 index 000000000..c0b9e01c6 --- /dev/null +++ b/subjects/reversebits.md @@ -0,0 +1,20 @@ +# reversebits +## Instructions + +Write a function that takes a byte, reverses it, bit by bit (like the +example) and returns the result. + +Your function must be declared as follows: + +func ReverseBits(octet byte) byte { + ... +} + +Example: + + 1 byte +_____________ + 00100110 + || + \/ + 01100100 diff --git a/subjects/swapbits.md b/subjects/swapbits.md new file mode 100644 index 000000000..cffe7d563 --- /dev/null +++ b/subjects/swapbits.md @@ -0,0 +1,20 @@ +# swapbits +## Instructions + +Write a function that takes a byte, swaps its halves (like the example) and +returns the result. + +Your function must be declared as follows: + +func SwapBits(octet byte) byte { + ... +} + +Example: + + 1 byte +_____________ + 0100 | 0001 + \ / + / \ + 0001 | 0100 \ No newline at end of file diff --git a/subjects/union.md b/subjects/union.md new file mode 100644 index 000000000..ceeba1f8c --- /dev/null +++ b/subjects/union.md @@ -0,0 +1,27 @@ +# union +## Instructions + +Write a program that takes two strings and displays, without doubles, the +characters that appear in either one of the strings. + +The display will be in the order characters appear in the command line, and +will be followed by a \n. + +If the number of arguments is not 2, the program displays \n. + +Example : + +```console +student@ubuntu:~/student/union$ go build +student@ubuntu:~/student/union$ ./union zpadinton "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e +zpadintoqefwjy$ +student@ubuntu:~/student/union$ ./union ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e +df6vewg4thras$ +student@ubuntu:~/student/union$ ./union "rien" "cette phrase ne cache rien" | cat -e +rienct phas$ +student@ubuntu:~/student/union$ ./union | cat -e +$ +student@ubuntu:~/student/union$ ./union "rien" | cat -e +$ +student@ubuntu:~/student/union$ +```