private static IEnumerable <Component> _getStrongestBridge(IEnumerable <Component> components, Bridge bridge)
        {
            var strongestBridge = new List <Component>();

            foreach (var component in components)
            {
                if (bridge.TryAddComponent(component))
                {
                    var nextList = _getStrongestBridge(components.Where(c => !c.Equals(component)), bridge).ToList();
                    if (strongestBridge.Sum(c => c.Strength) < nextList.Sum(c => c.Strength))
                    {
                        strongestBridge = nextList;
                    }
                }
            }
            strongestBridge.Add(bridge.RemoveComponent());
            return(strongestBridge);
        }
        private static async Task <IEnumerable <Component> > _getStrongestBridgeAsync(IEnumerable <Component> components, Bridge bridge)
        {
            var strongestBridge = new List <Component>();
            var nextLists       = new List <Task <IEnumerable <Component> > >();

            foreach (var component in components)
            {
                var newBridge = new Bridge(bridge);
                if (newBridge.TryAddComponent(component))
                {
                    nextLists.Add(Task.Run(() => _getStrongestBridge(components.Where(c => !c.Equals(component)).ToList(), newBridge)));
                }
            }
            foreach (var nextList in nextLists)
            {
                if ((await nextList).Sum(c => c.Strength) > strongestBridge.Sum(c => c.Strength))
                {
                    strongestBridge = (await nextList).ToList();
                }
            }
            strongestBridge.Add(bridge.RemoveComponent());
            return(strongestBridge);
        }