Closed

Python data structure

This project received 26 bids from talented freelancers with an average bid price of $25 USD.

Get free quotes for a project like this
Employer working
Project Budget
$10 - $30 USD
Total Bids
26
Project Description

Given a dictionary of dictionaries of format {key: {key: value, ...}, ...}, for example:

{'word1': {'word2': 0.5, 'word3': 0.5}, 'word4': {'word5': 0.5, 'word6': [url removed, login to view], 'word7':[url removed, login to view]}, 'word3': {'word8': [url removed, login to view], 'word9': [url removed, login to view], 'word10': [url removed, login to view]}, 'word5': {'word11': 0.5, 'word12': [url removed, login to view], 'word13': [url removed, login to view]}, 'word14': {'word15': 1}, 'word11': {'word15': 1}}

create a function that takes the dictionary, a word and a level as parameters and builds a graph (tree) for that word as a root with associated dictionary words as children and their values as edges. The function should return a dictionary of words for the product of all edges values that create a path from root to each node at the given level.

Example: given the dictionary above, 'word4', and distance 2 the function should return {'word11': [url removed, login to view], 'word12': [url removed, login to view], 'word13': [url removed, login to view]}

If you have any questions, do not hesitate to ask!

Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online