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.
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.
@ -11,7 +12,6 @@ This function must have the following signature.
@ -12,11 +12,11 @@ Write a program that does the same thing as the system's `cat` command-line.
- Copy to the `quest8.txt` file this :
- Copy to the `quest8.txt` file this :
- "Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
- "Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
- Copy to the `quest8T.txt` file this :
- 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."
- "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 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
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
### Expected function
```go
```go
func Join(arstr []string, sep string) string {
func Join(arstr []string, sep string) string {
}
}
```
```
### Usage
### Usage
@ -23,8 +22,8 @@ Here is a possible [program](TODO-LINK) to test your function :
@ -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:
- 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
### Expected main and function for the program
```go
```go
func defineRectangle(ptr *point, n int) *rectangle {
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.
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`.
- If it's possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`.