Unfortunately there are only too many bad tutorials on the Net
Sander Trepp wrote:. . . I have watches some tutorials
Most videos I have watched make the opposite mistake, teaching too fast, or assuming the viewers already know more than they do. I think it is usually better to take things slowly.
but those teach too slow . . .
Campbell Ritchie wrote:Unfortunately there are only too many bad tutorials on the Net
Sander Trepp wrote:. . . I have watches some tutorialsMost videos I have watched make the opposite mistake, teaching too fast, or assuming the viewers already know more than they do. I think it is usually better to take things slowly.
but those teach too slow . . .
Perfect Dating Site
Build the perfect matchmaking site! Being perfect, it doesn’t have to be [completely] real, e.g. the sole goal is matching, not engagement.
Your task is to build a site that will break into the booming fantasy dating scene. This particular site caters to a very niche audience: misfit elves and dwarves only looking to date outside of their own race - Elves & Dwarves Misfits - “EDM”. “EDM” offers elves and dwarves enthralling encounters with one another. After such an encounter, each dwarf and elf will grade their encounter by swinging their axe or knife (respectively) into The Sorting Tree. Strikes into the right side of the tree indicate a positive encounter, while marks on the left side of the tree indicate a negative encounter. A greater number of strikes indicates a stronger feeling after the encounter.
Given E number of elves and D number of dwarves, D <= E <= 500, the task is to optimize the creation of stable couples through “EDM”. “EDM” defines a stable couple as one where simultaneously no elf or dwarf would: a] like to leave their current relationship for someone else that they like more, and b] there is no external party that would pair better to one of the individuals already in the relationship (i.e. that no one else would want them more than their current partner).
The task should be a complete Java program reading from the standard input and writing to the standard output.
1)Names of the elves: a line starting with “Elves:”, followed by a comma separated list of unique elven names. The names consist only of lower and upper case Latin characters, no special symbols.
2)Names of the dwarves: a line starting with “Dwarves”, followed by a comma separated list of unique dwarven names. The names consist only of lower and upper case Latin characters, no special symbols.
3)Encounters between elves and dwarves and their swings onto a tree in the format: elfName : dwarfName = #elfinSwing SwingType x #dwarvenSwing SwingType, e.g. Ave : Boltor = 3R x 1L. In that example Ave likes Boltor quite a bit (3Right knife swings) but Boltor doesn’t like Ave back (1Left axe swing)
*SwingType can be either “R” or “L”
*Each elf can meet each dwarf at most once. Hence, the maximum amount of encounters is the product of E and D.
*Only elves and dwarves who have met each other can form a couple.
4)An empty line denotes the end of the input.
1)All stable relationships in the format of elfName : dwarfName, followed by a new line
Elves: Ave, Elegast, Taeriel, Saeya, Loralf
Dwarves: Duthila, Mondull, Boltor, Drummer
Ave : Duthila = 1R x 4R
Elegast : Duthila = 1R x 1R
Taeriel : Duthila = 1L x 3L
Saeya : Duthila = 2R x 1L
Loralf : Duthila = 1R x 2R
Taeriel : Mondull = 1R x 3R
Elegast : Mondull = 1R x 5R
Taeriel : Boltor = 1R x 1R
Loralf : Boltor = 1R x 1R
Loralf : Drummer = 1R x 1R
Loralf : Mondull = 2R x 2R
Elegast : Boltor = 1R x 10R
Saeya : Mondull = 1L x 1L
Saeya : Boltor = 1R x 1L
Ave : Duthila
Elegast : Mondull
Taeriel : Boltor
Loralf : Drummer
The task requires no special libraries outside the JDK, so use of such libraries is discouraged. It’s possible to have more than a single ‘stable’ solution.
The provided package contains two test input files: “test1” and “test2”, and two sample outputs “output1” and “output2”.
While the presented task is about fantasy couples, dating, and weapon-swinging, the matching problem has a wider application - in 2012 Nobel Prize in Economic Sciences was awarded to Lloyd S. Shapley and Alvin E. Roth: https://www.nobelprize.org/prizes/economic-sciences/2012/summary/
Tim Cooke wrote:Wowsers! 4 days for all of that? You're going to be busy.
Sander Trepp wrote:. . . a course that is pretty good . . .