当前位置:网站首页>Daily question 1189 Maximum number of "balloons"
Daily question 1189 Maximum number of "balloons"
2022-07-05 06:12:00 【A big pigeon】
topic :
Give you a string text, You need to use text To piece together as many words as possible "balloon"( balloon ).
character string text Each letter in can only be used once at most . Please return the maximum number of words you can piece together "balloon".
Explain : Count , The number of words is determined by the minimum number of letters .( Barrel effect )
class Solution:
def maxNumberOfBalloons(self, text: str) -> int:
cnt = Counter(text)
return min(cnt["b"],cnt["a"],cnt["l"]//2,cnt["o"]//2,cnt["n"])
边栏推荐
- 【Rust 笔记】13-迭代器(下)
- Is it impossible for lamda to wake up?
- LeetCode 1200. Minimum absolute difference
- Individual game 12
- Introduction to convolutional neural network
- Real time clock (RTC)
- Flutter Web 硬件键盘监听
- Shutter web hardware keyboard monitoring
- Redis publish subscribe command line implementation
- 1040 Longest Symmetric String
猜你喜欢
[jailhouse article] look mum, no VM exits
leetcode-6111:螺旋矩阵 IV
Spark中groupByKey() 和 reduceByKey() 和combineByKey()
Sqlmap tutorial (1)
[jailhouse article] jailhouse hypervisor
MatrixDB v4.5.0 重磅发布,全新推出 MARS2 存储引擎!
redis发布订阅命令行实现
Wazuh開源主機安全解决方案的簡介與使用體驗
Appium自动化测试基础 — Appium测试环境搭建总结
On the characteristics of technology entrepreneurs from Dijkstra's Turing Award speech
随机推荐
Personal developed penetration testing tool Satania v1.2 update
【Rust 笔记】17-并发(上)
【Rust 笔记】14-集合(下)
1040 Longest Symmetric String
JS quickly converts JSON data into URL parameters
Open source storage is so popular, why do we insist on self-development?
CPU内核和逻辑处理器的区别
[jailhouse article] look mum, no VM exits
Transform optimization problems into decision-making problems
Wazuh開源主機安全解决方案的簡介與使用體驗
【Rust 笔记】14-集合(上)
QQ computer version cancels escape character input expression
中职网络安全技能竞赛——广西区赛中间件渗透测试教程文章
Leetcode-31: next spread
js快速将json数据转换为url参数
4. 对象映射 - Mapping.Mapster
leetcode-1200:最小绝对差
[rust notes] 16 input and output (Part 1)
2022年貴州省職業院校技能大賽中職組網絡安全賽項規程
1041 Be Unique