본문 바로가기

Algorithm/Implementation

(750)
(C++) - LeetCode (easy) 551. Student Attendance Record I https://leetcode.com/problems/student-attendance-record-i/description/ Student Attendance Record I - LeetCode Can you solve this real interview question? Student Attendance Record I - You are given a string s representing an attendance record for a student where each character signifies whether the student was absent, late, or present on that day. The record only leetcode.com 구현 문제였습니다. 📕 풀이방법 📔..
(C++) - LeetCode (easy) 504. Base 7 https://leetcode.com/problems/base-7/description/ Base 7 - LeetCode Can you solve this real interview question? Base 7 - Given an integer num, return a string of its base 7 representation. Example 1: Input: num = 100 Output: "202" Example 2: Input: num = -7 Output: "-10" Constraints: * -107
(C++) - LeetCode (easy) 495. Teemo Attacking.cpp https://leetcode.com/problems/teemo-attacking/description/ Teemo Attacking - LeetCode Can you solve this real interview question? Teemo Attacking - Our hero Teemo is attacking an enemy Ashe with poison attacks! When Teemo attacks Ashe, Ashe gets poisoned for a exactly duration seconds. More formally, an attack at second t will mean Ashe is leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 ashe가 독에 당한 전체..
(C++) - LeetCode (easy) 492. Construct the Rectangle https://leetcode.com/problems/construct-the-rectangle/description/ Construct the Rectangle - LeetCode Can you solve this real interview question? Construct the Rectangle - A web developer needs to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whose length L and leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화..
(C++) - LeetCode (easy) 485. Max Consecutive Ones https://leetcode.com/problems/max-consecutive-ones/description/ Max Consecutive Ones - LeetCode Can you solve this real interview question? Max Consecutive Ones - Given a binary array nums, return the maximum number of consecutive 1's in the array. Example 1: Input: nums = [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last three leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 정답 ans..
(C++) - LeetCode (easy) 461. Hamming Distance https://leetcode.com/problems/hamming-distance/description/ Hamming Distance - LeetCode Can you solve this real interview question? Hamming Distance - The Hamming distance [https://en.wikipedia.org/wiki/Hamming_distance] between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, leetcode.com bitmasking으로 푼 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 ..
(C++) - LeetCode (easy) 441. Arranging Coins https://leetcode.com/problems/arranging-coins/description/ Arranging Coins - LeetCode Can you solve this real interview question? Arranging Coins - You have n coins and you want to build a staircase with these coins. The staircase consists of k rows where the ith row has exactly i coins. The last row of the staircase may be incomplete. Give leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 정답 ans를 선언해줍니..
(Python) - LeetCode (easy) 415. Add Strings https://leetcode.com/problems/add-strings/description/ Add Strings - LeetCode Can you solve this real interview question? Add Strings - Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string. You must solve the problem without using any built-in library for handling large in leetcode.com bigint 연산을 지원하는 python을 이용해 해결했습니다. 📕 풀이방법 📔 풀이과정 ..