# Programming and Data Structure Challenges

2 Pages501 Words348 Views
|
|
|
Programming, Algorithms and Data StructureWeek 1 1.Write a function that randomly shuffles an array of integers and explain the rationale behind its implementation. 2.Count the number of trailing 0s in a factorial number. Week 2 3.Write the pseudocode for a function which returns the highest perfect square which is less or equal to its parameter (a positive integer). Implement this in a programming language of your choice. 4.Look back at last week's tasks. Describe the run-time bounds of these algorithms using Big O notation. 5.Write the pseudocode corresponding to functions for addition, subtraction and multiplication of two matrices, and then compute A=B*C –2*(B+C), where B and C are two quadratic matrices of order n. What is the run-time? Week 3 6.Write the pseudocode and code for a function that reverses the words in a sentence.Input: "This is awesome" Output: "awesome is This". Give the Big O notation. 7.Write a recursive function (pseudocode and code) to check if a number n is prime (hint: check whether n is divisible by any number below n). 8.Write a recursive function (pseudocode and code) that removes all vocals from a given string s. Input: "beautiful" Output: "btfl". Week 4 9. Adapt the binary search algorithm so that instead of outputting whether a specific value was found, it outputs whether a value within a specific interval was found. Week 5 10.Given a sequence of n integer numbers, extract the sub-sequence of maximum length which is in ascending order. 11.Based on the Python code or the C++ code provided in class as a starting point, implement the binary search tree node delete function. Week 6 12. Implement TREE_SORT algorithm in a language of your choice, but make sure that the INORDER function is implemented iteratively. 2016/2017 1 of 2

## End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents

### Support

#### +1 306 205-2269

Chat with our experts. we are online and ready to help.