1 / 8

Today’s Agenda

Today’s Agenda. Problem Solving. Problem statement.

eldon
Download Presentation

Today’s Agenda

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Today’s Agenda Problem Solving

  2. Problem statement • Consider an employee database. It stores the information of employees in some organization. It maintains idno, name, salary and division of each employee. This information is stored in a file input.txt. Also number of employees is mentioned in the file on the first line of the file. • Salary is divided into different ranges • Less than 10,000 • 10,000 to 25,000 • 25,000 to 40,000 • 40,000 to 55,000 • More that 55,000

  3. Separate the employee details based on their salary into different lists. • Store the list of employees into different files.

  4. input.txt 1 mnr 30000 1 2 aman 55000 2 3 radha 15000 2 4 sumit 10000 3 5 ritika 45000 4 6 deepak 8000 5 7 rishikesh 80000 1 8 ashish 8500 5 9 eshan 75000 6 10 abhishek 50000 7

  5. Separate the employees based on their divisions into different lists. • Store these lists to different files.

  6. divisionInfo.txt IPC 1 FD1 2 FD2 3 FD3 4 RCD 5 ARCD 6 ID 7 WSU 8

  7. Problem IV (revisiting) • Declare two sequential lists using singly linked list. Populate data (numbers) in both the list by insert operation. • Perform merging of two list. Maintain increasing order of numbers in the resultant list. • Merge two list and create a new list. • Without creating a new list modify the links of the two lists and create a new list. Such merging is called in-place merging.

More Related