TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Philip Harris
NA
45
7.5k
Linked List search
Feb 24 2015 11:01 AM
So I have been making progress and have been trying to infuse articles with my old book I am reading about algorithms
so algorithm 2.7 is a linked search I posted it below .....NOTE (UNIFORM() is suppose to be a random number selector from 1 to n)
=========================================================
HERE IS WHERE I AM AT
// I used the list array for loop to print out the linked list to ck myself
using System;
using System.Collections.Generic;
using System.Text;
namespace TreeSort
{
class program
{
static void Main()
{
int[] _list = { 1, 3, 7, 9, 11 };
int n = 12;
int head = 0;
int next = 2;
int x = 12;
LinkedList<int> list = new LinkedList<int>(_list);
list.AddFirst(head);
LinkedListNode<int> first = list.First;
list.AddAfter(first, next);
list.AddLast(n);
int[] ListArray = new int[list.Count];
list.CopyTo(ListArray, 0);
int geuss = list.Count;
foreach (int y in ListArray)
{
Console.WriteLine(y);
}
for (int i = head; i < n; i++)
{
}
Console.ReadKey();
}
}
}
Reply
Answers (
3
)
how to show login time in welcome page
Append DatagridView content to Excel file