Programming, Algorithms and Data Structure.

Added on - 16 Sep 2019

  • 2


  • 501


  • 98


  • 0


Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 1 of 2 pages
Programming, Algorithms and Data StructureWeek 11.Write a function that randomly shuffles an array of integers and explain the rationalebehind its implementation.2.Count the number of trailing 0s in a factorial number.Week 23.Write the pseudocode for a function which returns the highest perfect square whichis less or equal to its parameter (a positive integer). Implement this in aprogramming language of your choice.4.Look back at last week's tasks. Describe the run-time bounds of these algorithmsusing Big O notation.5.Write the pseudocode corresponding to functions for addition, subtraction andmultiplication of two matrices, and then compute A=B*C –2*(B+C), where B and Care two quadratic matrices of order n. What is the run-time?Week 36.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 agiven string s. Input: "beautiful" Output: "btfl".Week 49. Adapt the binary search algorithm so that instead of outputting whether a specificvalue was found, it outputs whether a value within a specific interval was found.Week 510.Given a sequence of n integer numbers, extract the sub-sequence of maximumlength 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 612. Implement TREE_SORT algorithm in a language of your choice, but make sure thatthe INORDER function is implemented iteratively.2016/20171of2
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document