You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[Leetcode-326](https://leetcode.com/problems/power-of-three/)| Power Of Three |[c++](./leetcode/326.power-of-three.cpp), [python3](./leetcode/326.power-of-three.py)| Math | O\(1\)| O\(1\)| - |
145
145
|[Leetcode-50](https://leetcode.com/problems/powx-n/)| Powx N |[c++](./leetcode/50.powx-n.cpp), [python3](./leetcode/50.powx-n.py)| Math | O\(logN\)| O\(1\)| - |
146
146
|[Leetcode-1352](https://leetcode.com/problems/product-of-the-last-k-numbers/)| Product Of The Last K Numbers |[c++](./leetcode/1352.product-of-the-last-k-numbers.cpp), [python3](./leetcode/1352.product-of-the-last-k-numbers.py)| Math | O\(1\)| O\(N\)| - |
147
+
|[Leetcode-781](https://leetcode.com/problems/rabbits-in-forest/)| Rabbits In Forest |[c++](./leetcode/781.rabbits-in-forest.cpp), [python3](./leetcode/781.rabbits-in-forest.py)| Math | O\(N\)| O\(N\)| - |
|[Leetcode-13](https://leetcode.com/problems/roman-to-integer/)| Roman To Integer |[c++](./leetcode/13.roman-to-integer.cpp), [python3](./leetcode/13.roman-to-integer.py)| Math | O\(N\)| O\(1\)| - |
|[Leetcode-3282](https://leetcode.com/problems/reach-end-of-array-with-max-score/)| Reach End Of Array With Max Score |[c++](./leetcode/3282.reach-end-of-array-with-max-score.cpp), [python3](./leetcode/3282.reach-end-of-array-with-max-score.py)| Greedy | O\(N\)| O\(1\)| - |
325
327
|[Leetcode-3439](https://leetcode.com/problems/reschedule-meetings-for-maximum-free-time-i/)| Reschedule Meetings For Maximum Free Time I |[c++](./leetcode/3439.reschedule-meetings-for-maximum-free-time-i.cpp), [python3](./leetcode/3439.reschedule-meetings-for-maximum-free-time-i.py)| Greedy | O\(N\)| O\(N\)| - |
326
328
|[Leetcode-632](https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/)| Smallest Range Covering Elements From K Lists |[c++](./leetcode/632.smallest-range-covering-elements-from-k-lists.cpp), [python3](./leetcode/632.smallest-range-covering-elements-from-k-lists.py)| Greedy | O\(NlogN\)| O\(N\)| - |
|[Leetcode-863](https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/)| All Nodes Distance K In Binary Tree |[c++](./leetcode/863.all-nodes-distance-k-in-binary-tree.cpp), [python3](./leetcode/863.all-nodes-distance-k-in-binary-tree.py)| Hash Table | O\(N\)| O\(N\)| - |
// There is a forest with an unknown number of rabbits. We asked n rabbits "How many rabbits have the same color as you?" and collected the answers in an integer array answers where answers[i] is the answer of the ith rabbit.
9
+
// Given the array answers, return the minimum number of rabbits that could be in the forest.
10
+
//
11
+
// Example 1:
12
+
//
13
+
// Input: answers = [1,1,2]
14
+
// Output: 5
15
+
// Explanation:
16
+
// The two rabbits that answered "1" could both be the same color, say red.
17
+
// The rabbit that answered "2" can't be red or the answers would be inconsistent.
18
+
// Say the rabbit that answered "2" was blue.
19
+
// Then there should be 2 other blue rabbits in the forest that didn't answer into the array.
20
+
// The smallest possible number of rabbits in the forest is therefore 5: 3 that answered plus 2 that didn't.
# There is a forest with an unknown number of rabbits. We asked n rabbits "How many rabbits have the same color as you?" and collected the answers in an integer array answers where answers[i] is the answer of the ith rabbit.
9
+
# Given the array answers, return the minimum number of rabbits that could be in the forest.
10
+
#
11
+
# Example 1:
12
+
#
13
+
# Input: answers = [1,1,2]
14
+
# Output: 5
15
+
# Explanation:
16
+
# The two rabbits that answered "1" could both be the same color, say red.
17
+
# The rabbit that answered "2" can't be red or the answers would be inconsistent.
18
+
# Say the rabbit that answered "2" was blue.
19
+
# Then there should be 2 other blue rabbits in the forest that didn't answer into the array.
20
+
# The smallest possible number of rabbits in the forest is therefore 5: 3 that answered plus 2 that didn't.
0 commit comments