iT邦幫忙

2025 iThome 鐵人賽

DAY 4
0

題目介紹:

  • 編號:125
  • 類型:String, Two Pointers
  • 難度:easy
  • 題目連結:https://leetcode.com/problems/valid-palindrome/solutions/3165353/beats-96-9-well-explained-code-in-java/
  • 描述:Given a string s , return true if it is a palindrome, or false otherwise.

解鎖成功圖片:
https://ithelp.ithome.com.tw/upload/images/20250918/20178840mJJLGTBVW2.jpg

notion筆記截圖:
https://ithelp.ithome.com.tw/upload/images/20250918/20178840CPRVlx3UjT.jpg
https://ithelp.ithome.com.tw/upload/images/20250918/20178840kBV1OVPKlc.jpg

小小心得:

  • 今天練習了 Java 的 Character 類別操作,特別是 isLetterOrDigit() 與 toLowerCase(),未來如果要寫字串處理類題目很實用
  • 將雙指針法使用在字串上,更加熟悉了!

上一篇
<DAY3> - Two Sum II - imput array is sorted
系列文
「用 LeetCode 挑戰 30 天,打造扎實的程式邏輯力」- 結合Notion記錄學習筆記4
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言