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
ahmed salah
NA
530
149.9k
How to implement bubblesort inside main function
Dec 7 2016 10:42 AM
Hi I make function to bubble sort but i need to implement it inside
Main function as following :
class
Program
{
static
void
Main(
string
[] args)
{
}
}
How to implement bubblesort function inside Main function
and recieve number to implement it ?
public
List<
int
> bubblesort(List<
int
> a)
{
int
temp;
// foreach(int i in a)
for
(
int
i=1; i<=a.Count; i++)
for
(
int
j=0; j<a.Count-i; j++)
if
(a[j] > a[j + 1])
{
temp = a[j];
a[j] = a[j + 1];
a[j + 1] = temp;
}
return
a;
}
Reply
Answers (
5
)
Move Files from one directory to another directory in FTP
Data grid view font does not changing dynamically