I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component public class AllViewComponent : ViewComponent { private readonly UserManager<ApplicationUser> _userManager; public AllViewComponent(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public async Task<IViewComponentResult> InvokeAsync() { List<StudentViewModel> allUsers = new List<StudentViewModel>(); var items = await _userManager.Users.ToListAsync(); foreach (var item in items) { allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email }); }
Merging the ordered Singly Linked List:
Often it is necessary to merge two linked lists into a single linked list. Merging of two arrays consumes lots of time and storage whereas merging of two linked lists is simple. Just changing the address stored in link field of each node as and when required carries out the merging in case of linked list. Let us consider the example as follows before dealing with algorithm and program.
Often it is necessary to merge two linked lists into a single linked list. Merging of two arrays consumes lots of time and storage whereas merging of two linked lists is simple. Just changing the address stored in link field of each node as and when required carries out the merging in case of linked list. Let us consider the example as follows before dealing with algorithm and program.
Both of the linked lists are in ascending order. First node address of each linked list is stored in ROOT1 and ROOT2 respectively. In order to merge these lists we can use another external pointer ‘ROOT’ to point to the first node of each list is compare. The node whose information is less become the first node of the merged list and the address of that node is stored in ‘ROOT’ .The process is continued till the end of each list.
In the above example the information of the first node of the second list is smaller than that of first node of the first linked list. So, ROOT is assigned with ROOT2 and ROOT2 is updated to point to the next node of the second linked list . Now ROOT2 points to a node with information 23.
Comments
Post a Comment