public Engine() { this.addcollection = new AddCollection <string>(); this.addRemoveCollection = new AddRemoveCollection <string>(); this.myList = new MyList <string>(); this.resultingOutput = new StringBuilder(); }
public Engine() { this.addCollection = new AddCollection <string>(); this.addRemoveCollection = new AddRemoveCollection <string>(); this.myList = new MyList <string>(); this.stringBuilder = new StringBuilder(); }
public static void RemoveItems(IAddRemoveCollection collection, int count) { for (int i = 0; i < count; i++) { Console.Write(collection.Remove() + " "); } Console.WriteLine(); }
private void PrintRemovedElements(int cmd, IAddRemoveCollection collection) { for (int i = 0; i < cmd; i++) { writer.Write($"{collection.Remove()} "); } writer.WriteLine(" "); }
public static void RemoveItems <T>(T[] input, IAddRemoveCollection <T> collection, int count) { for (int i = 0; i < count; i++) { Console.Write($"{collection.Remove()}" + " "); } Console.WriteLine(); }
public static void RemoveFromColection(IAddRemoveCollection collection, int n) { for (int i = 0; i < n; i++) { Console.Write($"{collection.Remove()} "); } Console.WriteLine(); }
public Engine( IAddCollection addCollection, IAddRemoveCollection addRemoveCollection, IMyList myList) { this.addCollection = addCollection; this.addRemoveCollection = addRemoveCollection; this.myList = myList; }
private static void RemoveElements(IAddRemoveCollection collection, int numberOfElementsToRemove) { for (int i = 0; i < numberOfElementsToRemove; i++) { Console.Write(collection.Remove() + " "); } Console.WriteLine(); }
private void PrintRemovedResults(int removeOperationCount, IAddRemoveCollection collection) { var removedResults = new List <string>(); for (int j = 0; j < removeOperationCount; j++) { removedResults.Add(collection.Remove()); } Console.WriteLine(string.Join(" ", removedResults)); }
static void RemoveStuff(int n, IAddRemoveCollection collection) { List <string> results = new List <string>(); for (int i = 0; i < n; i++) { results.Add(collection.Remove()); } Console.WriteLine(string.Join(" ", results)); }
private void RemoveElementsFromCollection(int countRemovedElements, IAddRemoveCollection collection) { var removedElements = new List <string>(); for (var i = 0; i < countRemovedElements; i++) { removedElements.Add(collection.Remove()); } Console.WriteLine(string.Join(" ", removedElements)); }
private static void RemoveElemetnInCollection(IAddRemoveCollection collection, int removeCount) { StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < removeCount; i++) { string element = collection.RemoveElement(); stringBuilder.Append($"{element} "); } Console.WriteLine(stringBuilder); }
private static void RemoveMethod(IAddRemoveCollection <string> addRemoveCollection, int removeOperations) { var removeResult = new List <string>(); for (int i = 0; i < removeOperations; i++) { removeResult.Add(addRemoveCollection.Remove()); } Console.WriteLine(string.Join(" ", removeResult)); }
private static void RemoveElements(IAddRemoveCollection collection, int elementsToRemove) { List <string> output = new List <string>(elementsToRemove); for (int i = 0; i < elementsToRemove; i++) { output.Add(collection.Remove()); } Console.WriteLine(string.Join(" ", output)); }
public static string RemoveAmountOfStringsIARC(IAddRemoveCollection addRemoveCollection, int amountOfRemoveOperations) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < amountOfRemoveOperations; i++) { sb.Append(addRemoveCollection.Remove() + " "); } return(sb.ToString().Trim()); }
public static string PrintSecondLine(IAddRemoveCollection collection, string[] items) { StringBuilder sb = new StringBuilder(); foreach (var item in items) { sb.Append(collection.Add(item) + " "); } return(sb.ToString().Trim()); }
public static void PrintRemoveOperation(IAddRemoveCollection collection, int removeOperations) { List <string> output = new List <string>(); for (int i = 0; i < removeOperations; i++) { output.Add(collection.Remove()); } Console.WriteLine(string.Join(" ", output)); }
private static void PrintRemove(int toRemoveCount, IAddRemoveCollection adrc) { var removed = new List <string>(); for (int i = 0; i < toRemoveCount; i++) { removed.Add(adrc.Remove()); } Console.WriteLine(String.Join(" ", removed)); }
private static void RemoveItem(int count, IAddRemoveCollection collection) { List <string> result = new List <string>(); for (int i = 0; i < count; i++) { result.Add(collection.Remove()); } Console.WriteLine(string.Join(" ", result)); }
private string[] RemoveOperation(int removeNumber, IAddRemoveCollection collection) { var result = new string[removeNumber]; for (int i = 0; i < removeNumber; i++) { result[i] = collection.Remove(); } return(result); }
static List <string> RemoveElements(int number, IAddRemoveCollection collection) { List <string> list = new List <string>(); for (int i = 0; i < number; i++) { string element = collection.Remove(); list.Add(element); } return(list); }
private void RemoveElements(int removeCount, IAddRemoveCollection collection) { for (int i = removeCount; i > 0; i--) { var removedElement = collection.Remove(); resultingOutput.Append($"{removedElement} "); } resultingOutput .Remove(this.resultingOutput.Length - 1, 1) .AppendLine(); }
private static void RemoveElements(int elementsCount, IAddRemoveCollection collection) { List <string> removedElements = new List <string>(); for (int i = 0; i < elementsCount; i++) { string removedElement = collection.Remove(); removedElements.Add(removedElement); } Console.WriteLine(string.Join(' ', removedElements)); }
private void Remove <T>(int n, IAddRemoveCollection <T> collection) { for (int i = 0; i < n; i++) { var removedElement = collection.Remove(); this.stringBuilder.Append($"{removedElement} "); } this.stringBuilder .Remove(this.stringBuilder.Length - 1, 1) .AppendLine(); }
private void RemoveOperation <T>(int numberOfRemovals, IAddRemoveCollection <T> collection) { while (numberOfRemovals > 0) { var removedElement = collection.Remove(); this.resultingOutput.Append($"{removedElement} "); numberOfRemovals--; } this.resultingOutput .Remove(this.resultingOutput.Length - 1, 1) .AppendLine(); }
public void Remove <T>(int numberOfOperations, IAddRemoveCollection <T> collection) { for (int i = 0; i < numberOfOperations; i++) { var element = collection.Remove(); resultBuilder.Append($"{element} "); } resultBuilder = resultBuilder .Remove(this.resultBuilder.Length - 1, 1) .AppendLine(); }
private static void RemoveOperation(int numberOfRemovals, IAddRemoveCollection collection) { while (numberOfRemovals > 0) { var removedElement = collection.Remove(); resultingOutput.Append($"{removedElement} "); numberOfRemovals--; } resultingOutput .Remove(resultingOutput.Length - 1, 1) .AppendLine(); }
private static void RemoveOperation(int numberOfRemovals, IAddRemoveCollection collection, StringBuilder sb) { while (numberOfRemovals > 0) { var removedElement = collection.Remove(); sb.Append($"{removedElement} "); numberOfRemovals--; } sb .Remove(sb.Length - 1, 1) .AppendLine(); }
private static void ProcessRemove(int countRemove, IAddRemoveCollection addRemoveCollection, IAddRemoveCollection myList) { for (int i = 0; i < countRemove; i++) { Console.Write(addRemoveCollection.Remove() + " "); } Console.WriteLine(); for (int i = 0; i < countRemove; i++) { Console.Write(myList.Remove() + " "); } Console.WriteLine(); }
public BfsSearch(ISearchNodeVisitor <TNode> nodeVisitor, IAddRemoveCollection <ITree <TNode> > toVisit) { _nodeVisitor = nodeVisitor; _toVisit = toVisit; }