# 列表最大值 from functools import reduce def get_max(x,y): if x > y: return x else: return y l = [2, 3, 6, 1, 5] reduce(get_max,l) #简化 from functools import reduce reduce(lambda x,y:x if x>y else y,l) 6 5 Nested Lists 找到成绩排名第二的学生 第一种 用字典 #创...
Basic Data Types Nested Lists 10 Easy Solution.py Basic Data Types Finding the percentage 10 Easy Solution.py Basic Data Types Lists 10 Easy Solution.py Basic Data Types Tuples 10 Easy Solution.py Strings sWAP cASE 10 Easy Solution.py Strings String Split and Join 10 Easy Solution.py Strings...
Nested Lists.py Piling Up!Piling Up!.py Polar Coordinates.py Polynomials.py Power - Mod Power.py Print Function.py Python Evaluation.py Re.findall() & Re.finditer().py Re.split().py Re.start() & Re.end().py Re.start() & Re.end.py Reduce Function.py Regex Subs...
Dashboard Python Basic Data Types Basic Data Types Challenges EasyMediumHard Lists
nestedLists.py python answers Feb 6, 2023 nqueens.py stuff that isn't hackerrank Feb 6, 2023 printfunction.py python answers Feb 6, 2023 recursion.py stuff that isn't hackerrank Feb 6, 2023 runnerup.py python answers Feb 6, 2023 ...
Medium 40 Larry's Array Java Medium 40 Almost Sorted Java Medium 50 Matrix Layer Rotation Python3 O(n*m) O(n*m) Hard 80 Consecutive 1s in Binary Numbers Java O(n) O(1) Easy 30 Nested Logic Java O(1) O(1) Easy 40 Bitwise AND Java O(1) O(1) Easy 20 Strings#...
Python Division.py Python If-Else.py Say Hello, World! With Python.py Write a function.py 02 - Basic Data Type Find the Runner-Up Score!.py Finding the percentage.py List Comprehensions.py Lists.py Nested Lists.py Tuples.py 03 - Strings Alphabet Rangoli.py Capitalize...
The solutions are available in major languages like C, C++, Python, Go ,Java ,C#, Javascript, PHP, Typescript and Swift as of now. It is a great platform for users to contribute and provide the solutions in other languages too. EDIT: Happy to annouce that due in increase in ...
Python : Lists Python : Loops Python : Nested List With Second Method Python : Print Function Python : Text Alignment Python : Text Wrap Python : Write a Function Python Dictionary : Finding the Percentage Python: Mutating the immutable string ...
Medium 40 Larry's Array Java Medium 40 Almost Sorted Java Medium 50 Matrix Layer Rotation Python3 O(n*m) O(n*m) Hard 80 Consecutive 1s in Binary Numbers Java O(n) O(1) Easy 30 Nested Logic Java O(1) O(1) Easy 40 Bitwise AND Java O(1) O(1) Easy 20 Strings#...