Jack bought a new car, and he wants to travel to visit his friends, but he has too many. At each intersection he has a friend, so he must find the shortest possible way not to spend too much time on the road. Each street is a one-way street. The intersections are uniquely numbered from 1 to n, with n < 50. The streets also contain numbers, which represent the distances between 2 intersections. As Jack spent all his money for the new car, he has no money left to buy a GPS. Help Jack find the shortest path to his friends. If there is no path available, display an appropriate message.
Hint: Consider a graph in which the vertices are intersections, and the arcs are the streets determined by the intersections.
Tasks:
(1p) a) Modify the "Graph" class to represent an oriented graph.
(4p) b) Read from the keyboard the "streets" and the distances between 2 intersections. Save them in a graph.
Subject 2 – BST [5p]
(0.5p) a) Read letters from the keyboard and insert them in a BST. The reading process stops when the
user inserts the character 0 (zero).
(0.75p) b) Find the common ancestor of 2 given nodes.
(0.75p) c) Write a function to check is a node is a grandparent of a given node.
(1p) d) Design an algorithm which creates a linked list of all the nodes at each depth (i.e., if the tree has
depth D, you’ll have D linked lists).
(1p) e) Check if a BST is perfect or not (all leaves are at the same distance from the root).
(1p) f) Perform a right rotation of the BST.
Hello!
I have good experiences like your project.
I have read your all description carefully and I understand your requirement.
So I think I can deliver you good result.
Thanks. Best regards.
Hi Dear,
I read your description carefully.
I understood very well what you want.
My experience of developing projects with C/C++ and etc is over 5+ years.
I ensure the best quality of the result and I will do this in time as you want.
If we will work together, it will be a great pleasure for you and me.
I hope your kind reply.
Best Regards.
Gauss T.