Question: PLEASE ANSWER THE FOLLOWING QUESTIONSS USING C++ 1. Write a recursive function that returns the nth Fibonacci number. 2. Store the generated list of N

PLEASE ANSWER THE FOLLOWING QUESTIONSS USING C++

1. Write a recursive function that returns the nth Fibonacci number.

2. Store the generated list of N numbers and sort them by reverse lexical order.

3. Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures?

4. Implement an algorithm to find the kth to last element of a singly linked list.

5. Write a program to sort a stack such that the smallest items are on the top. You can use an additional temporary stack, but you may not copy the elements into any other data structure (such as an array). The stack supports the following operations: push, pop, peek and isEmpty.

6. Given a directed graph, design an algorithm to find out whether there is a route between two nodes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!