Method GetMajorityElement
GetMajorityElement(IEnumerable<string>, float)
Returns the most common element if it meets the ratio threshold.
Declaration
public static string GetMajorityElement(IEnumerable<string> items, float minRatio = 0.75)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | items | Items to analyze. |
| float | minRatio | Minimum ratio of occurrences required. |
Returns
| Type | Description |
|---|---|
| string | The most common element or null if the threshold is not met. |