Wow
URL; https://www.perplexity.ai/
Question: b4a code get x times of any number in 3,4,6,90,4,6,7,7,4
Answer:
URL; https://www.perplexity.ai/
Question: b4a code get x times of any number in 3,4,6,90,4,6,7,7,4
Answer:
B4X:
Dim arr() As Int = Array As Int(3, 4, 6, 90, 4, 6, 7, 7, 4)
Dim count As Map
count.Initialize
For Each num As Int In arr
If count.ContainsKey(num) Then
count.Put(num, count.Get(num) + 1)
Else
count.Put(num, 1)
End If
Next
For Each key As Int In count.Keys
Log("The value " & key & " appears " & count.Get(key) & " times in the array.")
Next