Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A Bank employee need your help to manage the details of customer. As few of the Bank customers holds the debit & credit cards, they

A Bank employee need your help to manage the details of customer. As few of the Bank customers holds the debit & credit cards, they want to maintain all the stuff. Let us help the employee in one section of it by performing some operations on Debit card i.e., deleting the expired card details and updating few customer details in the system etc. For that we need to have customerID details of that bank along with that we need to check the debit card year of expiry details in this problem statement, so customerID and year of expiry of that associated debit card details are given as input values. By using above details construct a binary tree by using linked list representation where each node should consist of customerID and year of expiry as inputs Let us do the operations on the debit card data of the customer: 1. List out the CustomerID & debit card year of expiry details? 2. List out all the customer details with debit card Year of expiry less than 5 years to the current year and delete each node one by one? 3. Check and list out the debit card year of expiry with greater than current year? 4. Check and list out the year of expiry In between 2019 to 2023 and update them by incrementing each year of that node with 13? 5. Print a new list of customer details with updated years of all the nodes? 6. Print the list of updated customer details in the In-order Traversal?

7. Run time analysis is to be provided in asymptotic notations.

Requirements: 1. Implement the above problem statement as a binary Tree using Linked List and in Python 3.7. 2. Read the input from a file inputPS10.txt.

3. You will output your answers to a file outputPS10.txt 4. Perform an analysis for the features above and give the running time in terms of input size: n. 5. If you were to use a different data structure, which would be the most ideal data structure to replace a general tree such that the overall time complexity is the least.

6. Use only native data types like lists and tuples in Python, do not use dictionaries provided in Python.

Sample file formats Sample Input file : Each row will have one CustomerId followed by the Year of expiry data separated by a comma. The input file name must be called inputPS10.txt. Sample inputPS10.txt CustomerID, Year of Expiry 61015, 2021 10987, 2020 11986, 2028......

Sample outputPS10.txt file These are the total of X number of customers CustomerID, Year of Expiry 61015, 2021 10987, 2020 18654, 2020 19753, 2021 81456, 2022 60709, 2021 Customer Details with Year of expiry < 5 years to the current year 39009, 2016 76109, 2009 99013, 2015 22091, 2014 Deleted node with customer ID: 39009 Deleted node with customer ID: 76109 Deleted node with customer ID: 99013 Deleted node with customer ID: 22091 Customer Details with Year of expiry > current year 11986, 2028 90673, 2035 48058, 2023 19822, 2036 34590, 2037 55628, 2028 Customer Details with Year of expiry in between 2019 and 2023 years 61015, 2021 10987, 2020 46976, 2022

......

Other instructions:

1. It is compulsory to make use of the data structure(s) / algorithms mentioned in the problem statement. 2. Ensure that all data structure insert and delete operations throw appropriate messages when their capacity is empty or full. Also ensure basic error handling is implemented.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

More Books

Students also viewed these Databases questions