主页

345. Reverse Vowels of a String

Promble link: https://leetcode.com/problems/reverse-vowels-of-a-string/description/ Given a string s, reverse only all the vowels in the string and return it. The vowels are ‘a’, ‘e’, ‘i’, ‘o’, and ‘u’, and they can appear in both lower and upper cases, more than once. Input: s = "hello" Output: "holle" Input: s = "leetcode" Output: "leotc...

阅读更多

605. Can Place Flowers

Promble link: https://leetcode.com/problems/can-place-flowers/description/ You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots. Given an integer array flowerbed containing 0’s and 1’s, where 0 means empty and 1 means not empty, and an integer n, return true i...

阅读更多

1431. Kids With the Greatest Number of Candies

Promble link: https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/ There are n kids with candies. You are given an integer array candies, where each candies[i] represents the number of candies the ith kid has, and an integer extraCandies, denoting the number of extra candies that you have. Return a boolean array result of l...

阅读更多

2023 Summer Internship

总结一下2023年Summer Internship的进度,虽然有些公司的结果还没出来,但是大部分的公司已经出来了。 日本的internship是真难找,是我一开始轻敌了。也有可能是我ES写的太烂了。 找了20多家公司,目前结果还不算明朗。 Entry的公司列表 PKSHA NEC NTT Yahoo Hitachi Dena Sony Fujitsu Ghelia Exawizards Rakuten Mitsubishi Brainpad Fujifilm TeamLab Accenture Olympus IBM LINE Huawei Sensetime Cyberagent To...

阅读更多

1768. Merge Strings Alternately

Promble link: https://leetcode.com/problems/merge-strings-alternately/ You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than the other, append the additional letters onto the end of the merged string. Return the merged string. Input: word1 = "abc",...

阅读更多

1071. Greatest Common Divisor of Strings

Promble link: https://leetcode.com/problems/greatest-common-divisor-of-strings/ For two strings s and t, we say “t divides s” if and only if s = t + … + t (i.e., t is concatenated with itself one or more times). Given two strings str1 and str2, return the largest string x such that x divides both str1 and str2. Input: str1 = "ABCABC", str2 =...

阅读更多

21. Merge Two Sorted Lists

Promble link: https://leetcode.com/problems/merge-two-sorted-lists You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list. Input: list1 = [1,2,4], list2 = [1,3,4] Out...

阅读更多

10. Regular Expression Matching

Promble Link: https://leetcode.com/problems/regular-expression-matching/description/ Given an input string s and a pattern p, implement regular expression matching with support for ‘.’ and ‘*’ where: ’.’ Matches any single character.​​​​ ‘*’ Matches zero or more of the preceding element. The matching should cover the entire input string (not ...

阅读更多