Eat Study Love

먹고 공부하고 사랑하라

C++ 147

Minimum Number of Pushes to Type Word II[M,Hash Table,String,Greedy,Sorting,Counting]

https://leetcode.com/problems/minimum-number-of-pushes-to-type-word-ii/description/?envType=daily-question&envId=2024-08-06 You are given a string word containing lowercase English letters.Telephone keypads have keys mapped with distinct collections of lowercase English letters, which can be used to form words by pushing them. For example, the key 2 is mapped with ["a","b","c"], we need to push ..

Coding_Practice 2024.08.06

Kth Distinct String in an Array[E,Array,Hash Table,String,Counting]

https://leetcode.com/problems/kth-distinct-string-in-an-array/description/?envType=daily-question&envId=2024-08-05A distinct string is a string that is present only once in an array.Given an array of strings arr, and an integer k, return the kth distinct string present in arr. If there are fewer than k distinct strings, return an empty string "".Note that the strings are considered in the order ..

Coding_Practice 2024.08.05

Range Sum of Sorted Subarray Sums[M,Array,Two Pointers,Binary Search,Sorting]

https://leetcode.com/problems/range-sum-of-sorted-subarray-sums/description/?envType=daily-question&envId=2024-08-04You are given the array nums consisting of n positive integers. You computed the sum of all non-empty continuous subarrays from the array and then sorted them in non-decreasing order, creating a new array of n * (n + 1) / 2 numbers.Return the sum of the numbers from index left to i..

Coding_Practice 2024.08.05

Review 11 - Dynamic Programming

https://eglife.tistory.com/123 Review 10 - Single-Source-Shortest Path in C++https://eglife.tistory.com/103 Review 9 - MST(Minimum Spanning Trees) in C++https://eglife.tistory.com/98 [Algorithm] Review 8 - Priority Queues and Heaps in C++https://eglife.tistory.com/92 [Main course!] Review 7 - Inheritance in C++https://eglife.tiseglife.tistory.com 프로그래밍 최악의 손님 DP다. 재귀적으로 진행되는 코딩은 솔루션을 펼쳐놓고 봐도 뭔 소..

SW 만학도/C++ 2024.08.03

Merge k Sorted Lists[H,Linked List,Divide and Conquer,Heap ,(Priority Queue)Merge Sort]

https://leetcode.com/problems/merge-k-sorted-lists/description/You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.Merge all the linked-lists into one sorted linked-list and return it. Example 1:Input: lists = [[1,4,5],[1,3,4],[2,6]]Output: [1,1,2,3,4,4,5,6]Explanation: The linked-lists are:[ 1->4->5, 1->3->4, 2->6]merging them into one sorted list:1-..

Coding_Practice 2024.08.03

Make Two Arrays Equal by Reversing Subarrays[E,Array,Hash Table,Sorting]

https://leetcode.com/problems/make-two-arrays-equal-by-reversing-subarrays/description/?envType=daily-question&envId=2024-08-03You are given two integer arrays of equal length target and arr. In one step, you can select any non-empty subarray of arr and reverse it. You are allowed to make any number of steps.Return true if you can make arr equal to target or false otherwise. Example 1:Input: tar..

카테고리 없음 2024.08.03

Review 10 - Single-Source-Shortest Path in C++

https://eglife.tistory.com/103 Review 9 - MST(Minimum Spanning Trees) in C++https://eglife.tistory.com/98 [Algorithm] Review 8 - Priority Queues and Heaps in C++https://eglife.tistory.com/92 [Main course!] Review 7 - Inheritance in C++https://eglife.tistory.com/89 Review 5 - Special Members in C++https://eglife.tistory.com/88 eglife.tistory.comGraph의 path와 관련된 알고리즘이다. 특정 노드에서 출발하는 가장 짧은 path를 찾는..

SW 만학도/C++ 2024.08.02