Ceng laboratory (3)

Page 1

LAB 6 1. (Joining Two Linked Lists) Write a function void join(Node *x, Node *y) that takes two arguments that are pointers to linked lists and joins the beginning of the second list to the end of the first one. 2. (Depth of a Tree) Write a recursive function int depthTree(Node *x) that takes a pointer to a binary tree and returns the depth of the tree. Turkish Translation 1. (İki Bağlı Listeyi Birleştirme) Bağlı liste işaretçileri (pointer) olarak iki argüman alıp ikinci listenin başını birincinin sonuna birleştiren void join(Node *x, Node *y) fonksiyonunu yazın. 2. (Ağacın Derinliği) Argüman olarak bir adet iki-kollu ağaç (binary tree) işaretçisi alıp bu ağacın derinliğini geri bildiren int depthTree(Node *x) fonksiyonunu yazın.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.