def sort_freqs(freqs):
    """Sort a word frequency histogram represented as a dictionary.

    Parameters
    ----------
    freqs : dict
      A dict with string keys and integer values.

    Return
    ------
    items : list
      A list of (count, word) pairs.
    """
    items = freqs.items()
    items.sort(key = lambda wc: wc[1])
    return items
    ## words,counts = freqs.keys(),freqs.values()
    ## # Sort by count
    ## items = zip(counts,words)
    ## items.sort()
    ## return items