Skip to content

guptaaniket261/Data_structure_and_algorithms_Assignment4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data_structure_and_algorithms_Assignment4

Marvel Character Graphs This assignment is based on the no of co-occurrences of different marvel characters in different movies.

Average

Print the average number of characters each Marvel character is associated with, as a float upto two decimal places.

Rank

Print a sorted list of all characters, with comma as delimiter (only comma, as delimiter and no space). Sorting should be in descending order of co-occurrence with other characters. That is, characters with more co-occurrences appear before. If there is a tie between characters based on co-occurrence count, then the order should be descending based on lexicographic order of the character strings.

independent_storylines_dfs

Implement DFS, then find independent storylines, that have no edge across them, using DFS. Print the characters in each independent storyline, as a separate line in the output. The largest storyline (with maximum characters) should appear at the top, followed by the second largest and so on. Within each line, the character names should be delimited with comma, and lexicographically sorted in descending order. If two storylines have same number of characters, ties should be broken in lexicographically descending order of character names

About

Marvel Character Graphs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages