2021-01-01から1ヶ月間の記事一覧
Codility problems2021/01月の記録です。Codilityの難易度 「PAINLESS」<「RESPECTABLE」<「AMBITIOUS」 の順でむずくなってるまずは分割統治法で簡単なの解いてみて、test=> 汎用的なコード書くこと エラーはpythonでも、javaとかc++でもググって応用して…
Letcode problems 1. Two Sum # exactly one solution Input: nums = [2,7,11,15], target = 9 Output: [0,1] Output: Because nums[0] + nums[1] == 9, we return [0, 1].class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: # …
HackerRank Interview Preparation Kit Type : Array Arrays: Left RotationExplanation When we perform left rotations, the array undergoes the following sequence of changes:Sample Input 5 4 1 2 3 4 5Sample Output 5 1 2 3 4 Solution def rotLeft…