17 subscribers
38 photos
16 videos
2 files
139 links
Download Telegram
​​#masala_3 #leetcode Sizga berilgan items massiv.Massivdi har bir elementini
itemsi = typei, colori, namei shu ko'rinishida tavsiflanadi unda ruleKey va ruleValue qiymatlari
mavjud :
ruleKey == "type" and ruleValue == typei.
ruleKey == "color" and ruleValue == colori.
ruleKey == "name" and ruleValue == namei.

Savol shartni qanoatlantridigan massiv ichidagi massivlar soni aniqlang?

Masalan:
1. items = ["phone","blue","pixel","computer","silver","lenovo","phone","gold","iphone"], ruleKey = "color", ruleValue = "silver"
Output: 1;
2. Input: items = ["phone","blue","pixel","computer","silver","phone","phone","gold","iphone"], ruleKey = "type", ruleValue = "phone"
Output: 2

#yechimni ko'rish 👉 @DasturlashMasalalar