Предмет: Английский язык, автор: fruktikfruktik95

срочно,помогите пожалуйста разобрать предложение на 5 типов вопросов!! They have come home

Ответы

Автор ответа: dimonchop
1

Відповідь:

1. Who has come home?

2. When did they come home?

3. Where did they come from?

4. Why have they come home?

5. How did they come home?

Похожие вопросы
Предмет: Информатика, автор: kumiho9fox
Всем здравствуйте. Очень большая проблема, было задание сделать шаблонный класс красно-чёрного дерева на с++. Код просто красно - чёрного дерева ( не шаблонного) я написал и он работает полностью исправно, но вот когда пытаюсь переделать в шаблонный класс, сразу появляется куча ошибок. Пожалуйста, помогите, у меня безвыходная ситуация, программу сдавать буквально завтра.
Вот мой код
}
if (k == root) {
break;
}
}
root->color = 0;
}
void printHelper(NodePtr root, string indent, bool last) {
if (root != TNULL) {
cout « indent;
if (last) {
cout « "R----";
indent += " ";
} else {
cout « "L----";
indent += "| ";
}

string sColor = root->color ? "RED" : "BLACK";
cout « root->data « "(" « sColor « ")" « endl;
printHelper(root->left, indent, false);
printHelper(root->right, indent, true);
}
}
public:
RedBlackTree() {
TNULL = new Node;
TNULL->color = 0;
TNULL->left = nullptr;
TNULL->right = nullptr;
root = TNULL;
}
void preorder() {
preOrderHelper(this->root);
}
void inorder() {
inOrderHelper(this->root);
}
void postorder() {
postOrderHelper(this->root);
}
NodePtr searchTree(int k) {
return searchTreeHelper(this->root, k);
}
NodePtr minimum(NodePtr node) {
while (node->left != TNULL) {
node = node->left;
}
return node;
}
NodePtr maximum(NodePtr node) {
while (node->right != TNULL) {
node = node->right;
}
return node;
}
NodePtr successor(NodePtr x) {
if (x->right != TNULL) {
return minimum(x->right);
}
NodePtr y = x->parent;
while (y != TNULL && x == y->right) {
x = y;
y = y->parent;
}
return y;
}
NodePtr predecessor(NodePtr x) {
if (x->left != TNULL) {
return maximum(x->left);
}
NodePtr y = x->parent;
while (y != TNULL && x == y->left) {
x = y;
y = y->parent;
}
return y;
}
void leftRotate(NodePtr x) {
NodePtr y = x->right;
x->right = y->left;
if (y->left != TNULL) {
y->left->parent = x;
}
y->parent = x->parent;
if (x->parent == nullptr) {
this->root = y;
} else if (x == x->parent->left) {
x->parent->left = y;
} else {
x->parent->right = y;
}
y->left = x;
x->parent = y;
}
void rightRotate(NodePtr x) {
NodePtr y = x->left;
x->left = y->right;
if (y->right != TNULL) {
y->right->parent = x;
}
y->parent = x->parent;
if (x->parent == nullptr) {
this->root = y;
} else if (x == x->parent->right) {
x->parent->right = y;
} else {
x->parent->left = y;
}
y->right = x;
x->parent = y;
}
void insert(int key) {
NodePtr node = new Node;
node->parent = nullptr;
node->data = key;
node->left = TNULL;
node->right = TNULL;
node->color = 1;
NodePtr y = nullptr;
NodePtr x = this->root;
while (x != TNULL) {
y = x;
if (node->data < x->data) {
x = x->left;
} else {
x = x->right;
}
}
node->parent = y;
if (y == nullptr) {
root = node;
} else if (node->data < y->data) {
y->left = node;
} else {
y->right = node;
}
if (node->parent == nullptr) {
node->color = 0;
return;
}
if (node->parent->parent == nullptr) {
return;
}
insertFix(node);
}
NodePtr getRoot() {
return this->root;
}
void deleteNode(int data) {
deleteNodeHelper(this->root, data);
}
void printTree() {
if (root) {
printHelper(this->root, "", true);
}
}
};
int main() {
RedBlackTree bst;
bst.insert(53);
bst.insert(4);
bst.insert(50);
bst.insert(60);
bst.insert(13);
bst.insert(57);
bst.printTree();
cout « endl« "After adding" « endl;
//bst.insert(53);
bst.printTree();
cout « endl« "After deleting" « endl;
bst.deleteNode(53);
bst.printTree();
}
Предмет: Алгебра, автор: vvfgvgvgvgctcyv