Skip to content

Some beginner-level problem-solving assignments I did over Tet holiday

Notifications You must be signed in to change notification settings

quynhanhninh/kattisproblems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

3 Kattis problems

My solutions, using Python language, to three Kattis problems. The programs use key concepts in Python programming for beginners, such as string manipulation, lists, and loops.

Problem Description

  1. Run-Length Encoding, Run!: A program that encode/decodes a line of text following the run-length compression scheme.

When encoding a text string, repeated consecutive characters are replaced by a single instance of that character and the number of occurrences of that character (the character’s run length). Decoding the encoded string results in the original string by repeating each character the number of times encoded by the run length.

  1. Cudoviste: A program that checks the possible parking slots (2x2 cells) from any input map by calculating the number of cars that will be squashed for parking spaces.
  2. Backspace: A program that fixes the backspace error of the text editor, by deleting the "<" character and its preceding character in a line of text.

Other information

The three programs included in this repository provide corresponding solutions to each of the listed problems above.

I solved these problems by myself. The total amount of time I spent on each problem, including reading prompt, writing and fixing codes, and proofreading/formatting, is as follow:

  • Problem #1 - Run-Length Encoding, Run!: 1.5 hours
  • Problem #2 - Cudoviste: 2.5 hours
  • Problem #3 - Backspace: 45 minutes

Any comments on the programs or feedback to improve my logics are welcomed!

About

Some beginner-level problem-solving assignments I did over Tet holiday

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages