Categories
Medium Problems

โจทย์ข้อที่ MX0039

จงเขียนฟังก์ชั่นที่รับ string เข้าไปแล้ว ให้ส่ง array ที่แสดงจำนวนของ “#” และ “+” ใน string ในออกมา

Examples

hashPlusCount(“###+”) ➞ [3,1]

hashPlusCount (“#+++#+#++#”) ➞ [4,6]

Leave a Reply