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.
@ -9,9 +10,8 @@ This function must have the following signature.
@ -6,17 +6,17 @@ Write a program that does the same thing as the system's `cat` command-line.
- You don't have to handle options.
- But if just call the program with out arguments it should take a input and print it back
- But if just call the program with out arguments it should take a input and print it back
- In the program folder create two files named `quest8.txt` and `quest8T.txt`.
- Copy to the `quest8.txt` file this :
- "Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
- Copy to the `quest8T.txt` file this :
- "Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
- "Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."
- Copy to the `quest8T.txt` file this :
- "Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."
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.
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
@ -8,11 +9,9 @@ The function must have the next signature.
### Expected function
```go
func Join(arstr []string, sep string) string {
}
```
### Usage
@ -23,8 +22,8 @@ Here is a possible [program](TODO-LINK) to test your function :
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`.
Write a function `ListForEachIf` that applies a function given as argument to the information within some links of the list.
Write a function `ListForEachIf` that applies a function given as argument to the information within some links of the list.
- For this you will have to create a function `CompStr`, that returns a `bool`, to compare each elemente of the linked list, to see if it is a string, and than apply the function in the argument of `ListForEachIf`.
@ -13,29 +13,29 @@ is defined by the points of the upper left and lower right corners.
- Our main task is to make a program that:
- Given a slice of points of size `n` returns the smallest rectangle that contains all the points in the vector of points. The name of that function is `defineRectangle`
- Given a slice of points of size `n` returns the smallest rectangle that contains all the points in the vector of points. The name of that function is `defineRectangle`
- And calculates and prints the area of that rectangle you define.
- And calculates and prints the area of that rectangle you define.
### Expected main and function for the program
```go
func defineRectangle(ptr *point, n int) *rectangle {
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.
- If it's possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`.