Skip to content

Commit

Permalink
Internal
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 643339228
  • Loading branch information
RerRayne authored and copybara-github committed Jun 14, 2024
1 parent f5a35f6 commit 63f7c98
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions clrs/_src/clrs_text/clrs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,22 +178,20 @@ def sample_to_str(
Output examples with hints:
1. insertion_sort
input_str = 'key: [0.549 0.715 0.603 0.545 0.424], trace:
0->1->2->3->4'
input_str = 'insertion_sort: key: [0.549 0.715 0.603], initial_trace:
[0.549 0.715 0.603] trace | pred:'
output_names_strs = 'pred'
output_str = '[0.549 0.715 0.603 0.545 0.424],
[0.549 0.603 0.715 0.545 0.424],
[0.545 0.549 0.603 0.715 0.424],
[0.424 0.545 0.549 0.603 0.715]
| [0.424 0.545 0.549 0.603 0.715]'
output_str = '[0.549 0.715 0.603] | [0.549 0.603 0.715]'
2. find_maximum_subarray
input_str = 'key: [0.098 0.43 0.206 0.09 -0.153]'
output_names_strs = 'start, end'
output_str = '0, 3'
input_str = 'find_maximum_subarray_kadane: key: [0.098 0.43 0.206],
initial_trace: (0, 0) trace | (best_low, best_high):'
output_names_strs = 'best_low, best_high'
output_str = '(0, 1) | (0, 2)'
3. binary_search
input_str = 'key: [0.424 0.545 0.549 0.603 0.715], target: 0.646'
input_str = 'binary_search: key: [0.549 0.603 0.715], target: 0.545,
initial_trace: (0, 2) trace | (low, high):'
output_names_strs = 'return'
output_str = '4'
output_str = '(0, 1) | (0, 0)'
For more details about task specs refer to
clrs._src.specs
Expand Down

0 comments on commit 63f7c98

Please sign in to comment.