Professional Documents
Culture Documents
STW210CT: Programming, Algorithms and Data Structures: Assignment Brief 2019
STW210CT: Programming, Algorithms and Data Structures: Assignment Brief 2019
STW210CT: Programming, Algorithms and Data Structures: Assignment Brief 2019
Submission arrangement online via Softwarica Moodle: Upload through Assignment links
File types and method of recording: URLs (source code repositories)
Mark and Feedback date: Within 3 weeks of assignment submission
Mark and Feedback method: Rubric marks and comments via Softwarica LMS
Notes:
1. You are expected to use the CUHarvard referencing format. For support and advice on how this
students can contact Centre for Academic Writing (CAW).
2. Please notify your registry course support team and module leader for disability support.
3. The University cannot take responsibility for any coursework lost or corrupted on disks, laptops or
personal computer. Students should therefore regularly back-up any work and are advised to
save it on the University system.
4. If there are technical or performance issues that prevent students submitting coursework through
the online coursework submission system on the day of a coursework deadline, an appropriate
extension to the coursework submission deadline will be agreed. This extension will normally be
24 hours or the next working day if the deadline falls on a Friday or over the weekend period. This
will be communicated via email and as a Softwarica Moodle announcement.
Week 1
‘Pascal’s triangle is a number triangle with numbers arranged in staggered
rows such that 𝑎𝑛𝑟 = 𝑛! /𝑟!(𝑛−𝑟)! This equation is for a binomial coefficient.
You can build Pascal’s triangle by adding the two numbers that are
diagonally above a number in the triangle. Write a program using recursion
that prints out Pascal’s triangle. Your program should accept a parameter
that tells how many rows of the triangle to print [6 marks]
Week 2
Given set A and set B of English alphabet, return minimum times we have
to swap set A so that it become set B [6 marks]
Example:
Inupt: A={a,c,b} b={bca}
OUTPUT: 1
Week 3
Given an unsorted array, find kth minimum difference between the
successive elements in its sorted form. [6 marks]
Return 0 if the array contains less than 2 elements.
Input: [7, 5, 2, 12]
Output: 3
Explanation: The sorted form of the array is [2, 5, 7, 12], either (2, 5) or (5,
7) has the minimum difference and second minimum difference is 5-2 i.e. 3.
Week 4
Write a recursive function that traverses a binary tree, and prints the value
of every node which has at least four great-grandchildren. [6 marks]
Week 5
Write a program to merge two linked lists. The input list have their elements
in sorted order, from lowest to highest. The output list should also be sorted
from lowest to highest. [6 marks]
Week 6
Implement Merge sort for the case where the input is a linked list. [6
marks]
Week 7
Given set A and set B of English alphabet, return minimum times we have
to swap set A so that it become set B [6 marks]
Example:
Inupt: A={a,c,b} b={bca}
OUTPUT: 1
Week 8
Given a binary tree, return the product of values of nodes with odd-valued
great grandparent. (A grandparent of a node is the parent of its parent)
If there are no nodes with an odd-valued grandparent, return 0. [8 marks]
INPUT:
OUTPUT:
4*5*6*8
WEEK 9 TO 11
Create an address book application in Java. The application should have
feature of managing contact detail of people including the fields like name,
address, telephone, mobile, email, etc. (7 marks). The application should
have the feature of searching based on any field criteria (7 marks).
Duplicate checking should be available in the fields like mobile, email (7
marks). The application should provide the contact detail in tabular and
printer friendly format (7 marks). Demonstrate the use of suitable data
structures to achieve above-mentioned functional requirements wherever
possible (6 marks). Implement the unit testing frameworks like JUnit to
perform unit testing for at least 3 functionalities with in this application (9
marks). Students are encouraged to use GUI frameworks like Swing while
building the application (7 marks) [50 marks]