tag 字典序

標籤
貢獻2
14
07:06 PM · Dec 03 ,2025

@字典序 / 博客 RSS 訂閱

Mandy80 - C++字符串處理深度解析:從C風格字符串到現代實踐

1. C風格字符串基礎:理解字符串的底層邏輯 C風格字符串是C++繼承自C語言的遺產,它本質上是字符數組,以空字符\0結尾。這種設計簡潔高效,但也隱藏着許多陷阱。為什麼從這裏開始?因為strcmp正是建立在這種基礎上的。只有搞懂了“地基”,才能穩穩地“蓋樓”。 1.1 C風格字符串的定義與歷史淵源 C風格字符串(null-terminated strings)最

字符串 , 初始化 , 代碼人生 , 字典序

收藏 評論

愛吃飯的程序媛 - 1170. Compare Strings by Frequency of the Smallest Character

題目 Let's define a functionf(s)over a non-empty strings, which calculates the frequency of the smallest character ins. For example,ifs = "dcce"thenf(s) = 2because the smallest character is"

數組 , yyds乾貨盤點 , i++ , 代碼人生 , 字典序

收藏 評論