| 144 | } |
| 145 | |
| 146 | int main() |
| 147 | { |
| 148 | struct Node *temp; |
| 149 | |
| 150 | root = RInsert(root, 10); |
| 151 | RInsert(root, 10); |
| 152 | RInsert(root, 40); |
| 153 | RInsert(root, 20); |
| 154 | RInsert(root, 30); |
| 155 | RInsert(root, 25); |
| 156 | RInsert(root, 35); |
| 157 | RInsert(root, 55); |
| 158 | |
| 159 | Delete(root, 30); |
| 160 | |
| 161 | Inorder(root); |
| 162 | printf("\n"); |
| 163 | |
| 164 | temp = Search(20); |
| 165 | if (temp != NULL) |
| 166 | printf("Element %d is found\n", temp->data); |
| 167 | else |
| 168 | { |
| 169 | printf("Element is not found\n"); |
| 170 | } |
| 171 | |
| 172 | return 0; |
| 173 | } |