akshitagit / akshitagit/JavaScript

Strings Compression

Đang mở
#17 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
good first issue Hacktoberfest hacktoberfest2020 Javascript Strings
Ngôn ngữ chính
JavaScript
Star
90
Fork
106
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Take as input S, a string. Write a function that does basic string compression. Print the value returned. E.g. for input “aaabbccds” print out a3b2c2d1s1.
Input Format

A single String S
Constraints

1 < = length of String < = 1000
Output Format

The compressed String.
Sample Input

aaabbccds

Sample Output

a3b2c2d1s1

Explanation

In the given sample test case 'a' is repeated 3 times consecutively, 'b' is repeated twice, 'c' is repeated twice and 'd and 's' occurred only once.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.