hackerrank-solutions

所属分类:collect
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2023-06-03 10:58:13
上 传 者sh-1993
说明:  HackerRank.上竞争性编程练习的解决方案集合。,
(A collection of solutions to competitive programming exercises on HackerRank.,)

文件列表:
certificates/ (0, 2021-11-21)
certificates/problem-solving-basic/ (0, 2021-11-21)
certificates/problem-solving-basic/active-traders/ (0, 2021-11-21)
certificates/problem-solving-basic/active-traders/problem.png (229437, 2021-11-21)
certificates/problem-solving-basic/active-traders/solution.py (814, 2021-11-21)
certificates/problem-solving-basic/active-traders/stub.cc (1381, 2021-11-21)
certificates/problem-solving-basic/active-traders/stub.py (665, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/ (0, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input000.txt (122, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input001.txt (113, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input002.txt (125, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input003.txt (260, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input004.txt (185, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input005.txt (146, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input006.txt (285, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input007.txt (185, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/input009.txt (9421, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output000.txt (17, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output001.txt (10, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output002.txt (9, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output003.txt (33, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output004.txt (32, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output005.txt (74, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output006.txt (100, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output007.txt (80, 2021-11-21)
certificates/problem-solving-basic/active-traders/test-cases/output009.txt (86, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/ (0, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/problem.png (278676, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/solution.py (1289, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/stub.cc (1800, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/stub.py (924, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/test-cases/ (0, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/test-cases/input000.txt (21, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/test-cases/input001.txt (25, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/test-cases/input002.txt (16, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/test-cases/input003.txt (75, 2021-11-21)
certificates/problem-solving-basic/balanced-system-files-partition/test-cases/input004.txt (77, 2021-11-21)
... ...

# Disclaimer This is throw-away code that is only supposed to correctly get the job done. I used the code stubs provided by HackerRank, so don't mind the unnecessary imports, naming convention and so on. Feel free to use my solutions as inspiration, but please don't literally copy the code. # Certificates To get a certificate, two problems have to be solved within 90 minutes. The following is an incomplete list of possible problems per certificate as of 2021.09.15. Please let me know if the certificate problems have changed, so I can put a note here. - [Problem Solving (Basic)](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic) - [Active Traders](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/active-traders) - [Balanced System Files Partition](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/balanced-system-files-partition) - [Longest Subarray](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/longest-subarray) - [Maximum Cost of Laptop Count](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/maximum-cost-of-laptop-count) - [Nearly Similar Rectangles](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/nearly-similar-rectangles) - [Parallel Processing](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/parallel-processing) - [Password Decryption](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/password-decryption) - [Road Repair](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/road-repair) - [String Anagram](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/string-anagram) - [Subarray Sums](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/subarray-sums) - [Unexpected Demand](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/unexpected-demand) - [Usernames Changes](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/usernames-changes) - [Vowel Substring](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-basic/vowel-substring) - [Problem Solving (Intermediate)](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate) - [Bitwise AND](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/bitwise-and) - [Equalizing Array Elements](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/equalizing-array-elements) - [File Renaming](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/file-renaming) - [Hotel Construction](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/hotel-construction) - [Largest Area](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/largest-area) - [Maximum Subarray Value](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/maximum-subarray-value) - [Nice Teams](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/nice-teams) - [Sorted Sums](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/sorted-sums) - [Task of Pairing](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/task-of-pairing) - [User-Friendly Password System](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/user-friendly-password-system) Besides the solutions, there are Python 3 and C++ code stubs and some test cases so you can first try to solve the problems without time pressure if you want to. # Challenges - [A Very Big Sum](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/a-very-big-sum.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/a-very-big-sum) [10p] - [ACM ICPC Team](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/acm-icpc-team.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/acm-icpc-team) [25p] - [Angry Professor](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/angry-professor.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/angry-professor) [20p] - [Append and Delete](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/append-and-delete.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/append-and-delete) [20p] - [Apple and Orange](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/apple-and-orange.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/apple-and-orange) [10p] - [Beautiful Days at the Movies](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/beautiful-days-at-the-movies.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/beautiful-days-at-the-movies) [15p] - [Between Two Sets](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/between-two-sets.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/between-two-sets) [10p] - [Bill Division](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/bon-appetit.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/bon-appetit) [10p] - [Birthday Cake Candles](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/birthday-cake-candles.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/birthday-cake-candles) [10p] - [Breaking the Records](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/breaking-best-and-worst-records.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/breaking-best-and-worst-records) [10p] - [Cats and a Mouse](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/cats-and-a-mouse.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/cats-and-a-mouse) [15p] - [Circular Array Rotation](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/circular-array-rotation.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/circular-array-rotation) [20p] - [Climbing the Leaderboard](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/climbing-the-leaderboard.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/climbing-the-leaderboard) [20p] - [Compare the Triplets](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/compare-the-triplets.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/compare-the-triplets) [10p] - [Counting Valleys](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/counting-valleys.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/counting-valleys) [15p] - [Cut the sticks](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/cut-the-sticks.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/cut-the-sticks) [25p] - [Day of the Programmer](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/day-of-the-programmer.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/day-of-the-programmer) [15p] - [Designer PDF Viewer](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/designer-pdf-viewer.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/designer-pdf-viewer) [20p] - [Diagonal Difference](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/diagonal-difference.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/diagonal-difference) [10p] - [Divisible Sum Pairs](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/divisible-sum-pairs.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/divisible-sum-pairs) [10p] - [Drawing Book](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/drawing-book.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/drawing-book) [10p] - [Electronics Shop](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/electronics-shop.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/electronics-shop) [15p] - [Equalize the Array](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/equality-in-a-array.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/equality-in-a-array) [20p] - [Extra Long Factorials](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/extra-long-factorials.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/extra-long-factorials) [20p] - [Find Digits](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/find-digits.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/find-digits) [25p] - [Forming a Magic Square](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/magic-square-forming.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/magic-square-forming) [20p] - [Frog in Maze](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/frog-in-maze.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/frog-in-maze) [65p] - [Grading Students](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/grading.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/grading) [10p] - [Jumping on the Clouds: Revisited](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/jumping-on-the-clouds-revisited.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/jumping-on-the-clouds-revisited) [15p] - [Jumping on the Clouds](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/jumping-on-the-clouds.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/jumping-on-the-clouds) [20p] - [Library Fine](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/library-fine.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/library-fine) [15p] - [Migratory Birds](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/migratory-birds.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/migratory-birds) [10p] - [Mini-Max Sum](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/mini-max-sum.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/mini-max-sum) [10p] - [Non-Divisible Subset](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/non-divisible-subset.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/non-divisible-subset) [20p] - [Number Line Jumps](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/kangaroo.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/kangaroo) [10p] - [Organizing Containers of Balls](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/organizing-containers-of-balls.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/organizing-containers-of-balls) [30p] - [Picking Numbers](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/picking-numbers.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/picking-numbers) [20p] - [Plus Minus](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/plus-minus.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/plus-minus) [10p] - [Queen's Attack II](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/queens-attack-2.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/queens-attack-2) [30p] - [Repeated String](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/repeated-string.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/repeated-string) [20p] - [Sales by Match](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/sock-merchant.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/sock-merchant) [10p] - [Save the Prisoner!](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/save-the-prisoner.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/save-the-prisoner) [15p] - [Sequence Equation](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/permutation-equation.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/permutation-equation) [20p] - [Sherlock and Cost](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/sherlock-and-cost.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/sherlock-and-cost) [50p] - [Sherlock and Squares](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/sherlock-and-squares.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/sherlock-and-squares) [20p] - [Simple Array Sum](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/simple-array-sum.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/simple-array-sum) [10p] - [Staircase](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/staircase.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/staircase) [10p] - [Subarray Division](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/the-birthday-bar.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/the-birthday-bar) [10p] - [Taum and B'day](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/taum-and-bday.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/taum-and-bday) [25p] - [The Hurdle Race](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/the-hurdle-race.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/the-hurdle-race) [15p] - [Time Conversion](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/time-conversion.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/time-conversion) [15p] - [Utopian Tree](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/utopian-tree.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/utopian-tree) [20p] - [Viral Advertising](https://github.com/kilian-hu/hackerrank-solutions/blob/master/challenges/strange-advertising.py) [[url]](https://github.com/kilian-hu/hackerrank-solutions/blob/master/https://www.hackerrank.com/challenges/strange-advertising) [15p] # TODO - Find more efficient solution for [Maximum Subarray Value](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/maximum-subarray-value). It's getting timeouts for a few test cases. - Verify correctness of [Nice Teams](https://github.com/kilian-hu/hackerrank-solutions/blob/master/certificates/problem-solving-intermediate/nice-teams).

近期下载者

相关文件


收藏者