JeongDoc
취소

JAVA-알고리즘 Leetcode(Easy)-ImplementStrStr

Question Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 대충 해석 haystac에 needle이 일부분으로 존재하면 index를 반환하고 없으면 -1 반환하세요. Example #1 Input: hay...

JAVA-알고리즘 Leetcode(Easy)-Remove Element

Question Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this by modifying the...

JAVA-알고리즘 Leetcode(Easy)-Remove Duplicates from Sorted Array

Question Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this...

JAVA-알고리즘 Leetcode(Easy)-Merge Two Sorted Lists

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. 대충 해석 주어진 두 개의 리스트를 하나의 새로운 리스트로 만들어보...

JAVA-알고리즘 Leetcode(Medium)-add Two Numbers

Question You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numb...

JAVA-알고리즘 Leetcode(Easy)-Valid Parentheses

Question Given a string s containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. An input string is valid if: 1. Open brackets must be closed by t...

JAVA-알고리즘 Leetcode(Easy)-Longest Common Prefix

Question Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. 대충 해석 문자열 배열 요소들의 공통된 접두어를 찾아보세요. 공통 접두어가 ...

JAVA-알고리즘 Leetcode(Easy)-Roman to Integer

Question Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol - value I - 1 V - 5 X - 10 L - 50 C - 100 D - 500 M - 1000 For example, two is written as...

JAVA-알고리즘 Leetcode(Easy)-Reverse Integer

Question Given a 32-bit signed integer, reverse digits of an integer. 대충 해석 주어빈 32비트 int를 뒤집어보세요 Example #1 Input:123 Output: 321 #2 Input: -123 Output: -321 #3 Input: 120 Output: 21 Soluti...

JAVA-알고리즘 Leetcode(Easy)-Two Sum

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 have exactly one solution, an...