Question 1: Convert a decimal to binary and binary to decimal using recursion Test your implementation with following examples: ● (1947)10 = (11110011011)2 ● (1992)10 = (11111001000)2 ● (2021)10 = (11111100101)2
Question 1:
Convert a decimal to binary and binary to decimal using recursion
Test your implementation with following examples:
● (1947)10 = (11110011011)2
● (1992)10 = (11111001000)2
● (2021)10 = (11111100101)2
Question 2:
Implement a member function that prints a singly linked list in reverse order without creating a
copy or changing the original List.
void printBackwards() const
Question 3:
Implement a recursive member function “isSorted” which recursively checks whether the linked list
is sorted (ascendingly).
bool isSorted() const
Question 4:
You will implement a function bool Equalize_Occurrences (char key, int maxcount) of the
class list, that will take a character key and maximum count for the consecutive occurrences of the
key in
parameters. It will then traverse the list, verify and update the consecutive occurrences of the key
according
to maximum count and returns true. It returns false if no occurrence of key is found.
Note: You can traverse the list only once for this task.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images