Skip to content

Commit

Permalink
fix(huffman): revert frequencies to original in CLRS
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayihu committed Aug 18, 2017
1 parent c1a66ef commit e97dcb7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Some real-world usage of the algorithms to show when they can be applied.
A classic application of this problem is in scheduling a room for multiple competing events, each having its own time requirements (start and end time), and many more arise within the framework of operations research. [Source](https://en.wikipedia.org/wiki/Activity_selection_problem)

### Huffman coding
### Huffman coding 🔡

> A Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression.
Expand Down
4 changes: 2 additions & 2 deletions algorithms/misc/huffman/__snapshots__/huffman.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
exports[`Huffman coding tree 1`] = `
│ ┌── d:16
│ ┌── 30
│ │ │ ┌── f:8
│ │ │ ┌── e:9
│ │ └── 14
│ │ └── e:6
│ │ └── f:5
│ ┌── 55
│ │ │ ┌── b:13
│ │ └── 25
Expand Down
4 changes: 2 additions & 2 deletions algorithms/misc/huffman/huffman.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ describe('huffman', () => {
{ char: 'b', frequency: 13 },
{ char: 'c', frequency: 12 },
{ char: 'd', frequency: 16 },
{ char: 'e', frequency: 6 },
{ char: 'f', frequency: 8 },
{ char: 'e', frequency: 9 },
{ char: 'f', frequency: 5 },
];
const tree = huffman(frequences);

Expand Down

0 comments on commit e97dcb7

Please sign in to comment.