C++ py3 #bitset #bitmask 速解#leetcode3120 Count the Number of Special Characters I
---
This kind of simple question is best suited for practicing programming skills.
[codes on Leetcode]https://leetcode.com/problems/count-the-number-of-special-characters-i/solutions/8293641/bitset-is-goodbeats-100-by-anwendeng-onn0/
====
time stamps:
00:00 - Problem Introduction: LeetCode 3120 - Count the Number of Special Characters I
00:18 - Problem Definition: Identifying "special" characters (both lowercase and uppercase present)
00:51 - Example 1 Analysis
01:21 - Example 2 and Example 3 Analysis
01:56 - Constraints Overview
02:16 - Solution Strategy: Using bitsets for lowercase and uppercase letters
03:22 - Optimization: Discussing a "branchless" approach using bitwise properties
04:02 - C++ Implementation: Using std::bitset
06:12 - Alternative C++ Implementation: Using Bitmasks (Bitwise OR/AND)
07:33 - Python 3 Implementation: Using Bitmasks
08:06 - Final Submission and Results
沒有留言:
張貼留言