알고리즘/자료구조

알고리즘/자료구조

[LeetCode] 230. Kth Smallest Element in a BST - Java

Kth Smallest Element in a BST - LeetCode Can you solve this real interview question? Kth Smallest Element in a BST - Given the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the tree. Example 1: [https://assets.leetco leetcode.com 문제 더보기 Given the root of a binary search tree, and an integer k, return the kth smallest v..

알고리즘/자료구조

[LeetCode] 530. Minimum Absolute Difference in BST - Java

Minimum Absolute Difference in BST - LeetCode Can you solve this real interview question? Minimum Absolute Difference in BST - Given the root of a Binary Search Tree (BST), return the minimum absolute difference between the values of any two different nodes in the tree. Example 1: [https://assets.l leetcode.com 문제 더보기 Given the root of a Binary Search Tree (BST), return the minimum absolute diff..

알고리즘/자료구조

[LeetCode] 242. Valid Anagram - Java

Valid Anagram - LeetCode Can you solve this real interview question? Valid Anagram - Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using leetcode.com 문제 더보기 Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram ..

알고리즘/자료구조

[LeetCode] 383. Ransom Note - Java

Ransom Note - LeetCode Can you solve this real interview question? Ransom Note - Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine and false otherwise. Each letter in magazine can only be used once in ranso leetcode.com 문제 더보기 Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using t..

알고리즘/자료구조

[LeetCode] 219. Contains Duplicate II - Java

Contains Duplicate II - LeetCode Can you solve this real interview question? Contains Duplicate II - Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j)

알고리즘/자료구조

[LeetCode] 1. Two Sum - Java

Two Sum - LeetCode Can you solve this real interview question? Two Sum - 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, and you may not leetcode.com 문제 더보기 Given an array of integers nums and an integer target, return indices of the two numbers such that they..

알고리즘/자료구조

[LeetCode] 150. Evaluate Reverse Polish Notation - Java

Evaluate Reverse Polish Notation - LeetCode Can you solve this real interview question? Evaluate Reverse Polish Notation - You are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation [http://en.wikipedia.org/wiki/Reverse_Polish_notation]. Evaluate t leetcode.com 문제 더보기 You are given an array of strings tokens that represents an arithmetic expres..

알고리즘/자료구조

[LeetCode] 155. Min Stack - Java

Min Stack - LeetCode Can you solve this real interview question? Min Stack - Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: * MinStack() initializes the stack object. * void push(int val) pushes t leetcode.com 문제 더보기 Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Im..

알고리즘/자료구조

[LeetCode] 21. Merge Two Sorted Lists - Java

Merge Two Sorted Lists - LeetCode Can you solve this real interview question? Merge Two Sorted Lists - You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists leetcode.com 문제 더보기 You are given the heads of two sorted linked lists list1 and list2. Merge the two lists..

알고리즘/자료구조

[LeetCode] 2. Add Two Numbers - Java

Add Two Numbers - LeetCode Can you solve this real interview question? Add Two Numbers - 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 numbers and leetcode.com 문제 더보기 You are given two non-empty linked lists representing two non-negative integers. The digits are..

jny0
'알고리즘/자료구조' 카테고리의 글 목록