Re: [闲聊] 每日LeetCode

楼主: Rushia (みけねこ的鼻屎)   2023-09-25 12:56:41
https://leetcode.com/problems/find-the-difference/description
389. Find the Difference
给你一个字串 s 和 t,t 是 s 字串字符乱序并加上一个字符组成的,返回这个被加上
的字符。
思路:
1.对s和t的字符计数,一个递增一个递减。
2.数量不为0的字符表示是多加的字符,返回即可。
Java Code:
作者: nozomizo (希霙)   2023-09-25 13:13:00
你是大师

Links booklink

Contact Us: admin [ a t ] ucptt.com