Search in Doubly Linked List c# -
i'm writing application using doubly linked list. need implement search in list. there list of employees name, id, department. need find specified employee her/his last name. ideas, how it's possible implement?
please not reinvent wheel. classes in .net - initialize linkedlist
, use enumerable.firstordefault
search:
linkedlist<employee> employees = .... var firstwithidseven = employees.firstordefault(e => e.id == 7); // assuming id int
note if need frequent search subset of parameters using dictionary
custom comparer more efficient.
Comments
Post a Comment