计算机类

Simplify the following Boolean expression!((i ==12) || (j > 15))struct Node {int value;Node* next;};1.1 Get the value of the Nth node from last node in the linked list.PARAM HEAD: the first element in the linked list:PARAM n: the number of the node counte

题目

Simplify the following Boolean expression

!((i ==12) || (j > 15))

struct Node {

int value;

Node* next;

};

1.1 Get the value of the Nth node from last node in the linked list.

PARAM HEAD: the first element in the linked list:

PARAM n: the number of the node counted reversely

RETURN: the value of the node, or -1 if not exists

int GetValue(Node* HEAD, int n)

{

}

1.2 Delete a node WITHOUT using the HEAD pointer.

PARAM p: A pointer pointed to a node in the middle of the linked list.

RETURN: void

void Delete(Node* p)

{

}

1.3 Insert a new node before p WITHOUT using the HEAD pointer

PARAM p: A pointer pointed to a node in the middle of the linked list.

PARAM value: new Node value

RETURN: void

void Insert(Node* p, int value)

{

}

Question 2:

Please write a String class with following features:

参考答案和解析
正确答案:
 
更多“Simplify the following Boolean expression !((i ==12) || (j > 15)) struct Node { int ”相关问题