-->
当前位置:首页 > 题库

PROGRAMMING:One way linked list 1

Luz5年前 (2021-05-10)题库650
Linked list nodes are defined as:
struct Node{
int data;
struct Node *next;
}
Programming implementation: input a positive integer repeat (0 < repeat < 10), do the following operations for repeat times:
Input a number of positive integers (input - 1 is the end flag), establish a one-way linked list, delete the odd value node and output
Input and output example: description in brackets
###Input example:
```in
2 (repeat=2)
1 2 3 4 5 6 7 -1
1 3 5 -1
```
###Output example:
```out
2 4 6
```






answer:If there is no answer, please comment