일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- 오늘도 우라라
- 그랑사가
- 리눅스
- ros
- 데이터 베이스
- publish
- 오늘도 우라라 펫 공략
- LeetCode
- 마리아 DB
- Linux
- 오늘도 우라라 공략
- 환경설정
- 기초
- install opencv-4.4.0 on ubuntu 22.04
- mysql
- while
- topic
- 프로그래밍
- C언어
- C++
- Subscribe
- ubuntu
- MSG
- mariaDB
- 토픽
- 등차수열
- JungOl
- 우분투
- 오늘도 우라라 펫
- 반복문
- Today
- Total
목록LeetCode (6)
하루의 쉼터
Question : Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. * Assume the environment does not allow you to store 64-bit integers (signed or unsigned). Example 1: Input: x = 123 Output: 321 Example 2: Example 2: Input: x = -123 Output: -321 Example 3: Example 3: Input: ..
Question : Merge two sorted linked lists and return it as a new sorted list. The new list should be made by splicing together the nodes of the first two lists. Example 1 : Input: l1 = [1,2,4], l2 = [1,3,4] Output: [1,1,2,3,4,4] Example 2 : Input: l1 = [], l2 = [] Output: [] Example 3 : Input: l1 = [], l2 = [0] Output: [0] Constraints : The number of nodes in both lists is in the range [0, 50] -1..
Question Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. Follow up: Could you implement a solution with a linear runtime complexity and without using extra memory? Example 1: Input: nums = [2,2,1] Output: 1 Example 2: Input: nums = [4,1,2,1,2] Output: 4 Example 3: Input: nums = [1] Output: 1 Constraints: 1
Question : Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Example 1:Input: s = "()"Output: true Example 2:Input: s = "()[]{}"Output: true Example 3:Input: s = "(]"Output: false Example ..
Question : Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. Input: 38 Output: 2 Explanation: The process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return it.Question Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would hav..
Question Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. Input: 38 Output: 2 Explanation: The process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return it. Solution.h //Hearder #include #include class Solution { private : int input_num; public: int addDigits(int num); int inputData(); void outputData(int num); }; Solution.cpp ..