Ask a question from expert

Ask now

Programming, Algorithms and Data Structure: Weekly Tasks and Exercises

2 Pages501 Words348 Views
   

Added on  2019-09-16

About This Document

This article covers weekly tasks and exercises for Programming, Algorithms and Data Structure course. It includes pseudocode and code for various functions, run-time bounds of algorithms, and implementation of graph data structure and traversals.

Programming, Algorithms and Data Structure: Weekly Tasks and Exercises

   Added on 2019-09-16

BookmarkShareRelated Documents
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
Programming, Algorithms and Data Structure: Weekly Tasks and Exercises_1

End of preview

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

Related Documents
Assignment on Data Structures and Algorithms (Doc)
|3
|1133
|304

AVL Tree, Set Intersection Algorithms, Sloppy Inc. Communication, Array Search
|9
|2413
|78

Desklib SEO Suggestions
|9
|2414
|194

CC4002 Information Systems Assignment
|3
|888
|761

CMSC 3613 Programming Assignment 2022
|3
|830
|20

Programming in Python: Constructing a Model of a Byte Adder
|2
|623
|132