Skip to content

Commit 6e7e00f

Browse files
Update algorithms/greedy/minimum_number_of_pushes/README.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent cf2daaf commit 6e7e00f

File tree

1 file changed

+1
-1
lines changed
  • algorithms/greedy/minimum_number_of_pushes

1 file changed

+1
-1
lines changed

algorithms/greedy/minimum_number_of_pushes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ optimal for minimizing key presses.
109109
- Iterate through the sorted frequency vector:
110110
- If the frequency of a letter is zero, break the loop as there are no more letters to process.
111111
- Calculate the number of pushes for each letter based on its position in the sorted list: (i / 8 + 1) * frequency[i].
112-
> the number of pushes required to obtain a single instance of it is (i / 8 + 1). Because there are 8 available
112+
> the number of pushes required to obtain a single instance of it is (i / 8 + 1). Because there are 8 available
113113
> keys (2 − 9), for the first 8 values of i (i = 0 to i = 7) corresponding to the first 8 frequent letters,
114114
> (i / 8 + 1) will give 1. For the next 8 values of i (i=8 to i=15) corresponding to the next 8 frequent letters,
115115
> (i / 8 + 1) will give 2, and this pattern continues.

0 commit comments

Comments
 (0)