Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Write a C function void transpose(int *m, int n) that transposes n by n matrix m. 2. Write a C function int evaluate_polynomial(int al,
1. Write a C function void transpose(int *m, int n) that transposes n by n matrix m. 2. Write a C function int evaluate_polynomial(int al, int n, int x) to evaluate polynomial 3. Write a C function void reverse(char 's) that takes a string as input, and reverses the order of its characters and stores in the string. For example, if string s is "abcd", after the function call, s becomes "dcba". You are not allowed to use strlen function 4. Write a C function int str2int(char 's) that takes string s as parameter and return the integer that s represents. For example, if string s is "123", then the function return integer 123. 5. Write a C function void int2binstr(int a, char s)) that converts integer a to its string representation and stores in char array s. For example, char ns[11], int2binstr(1234, ns), printf(%s",ns); will print 1234 6. Write C functions to search, to insert an element, and to delete elements in singly linked list. 7. Write a C function to display element backward from a singly linked list using stack and iterative algorithm. 8. For binary tree, write C functions to do traversal (n pre-order, in-order and post-order), depth-first-search, breath-first-search, to compute number of nodes, height, number of leaves. 9. For BST, write C functions to search, insert and delete using iterative algorithm. 10. For AVL tree, write C functions to rotate-right, rotate-left, insert and delete, to check if a BST is a AVL tree. 11. For binary heap, heapify-up, heapify-down, insert, delete min, heap sort 12. BFS and DFS for graphs, Kruskal's Prim's, Dijsktra's algorithms
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started