Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 14, 2012 04:03 AM by usman400
Dec 13, 2012 08:47 PM|LINK
I have some strings mixed up, each starts with a number. They need to be sorted by this number. I know they can be put into arrays and bubble sorted, but this is apparently inefficient. What is a better method to sort them in a certain way?
Also, say if I had a method that took a single string. I then wanted to store that string so that when the method is called again with a different string it is compared to the stored string. How do I maintain the storage?
Dec 14, 2012 04:03 AM|LINK
there are recommendations for each sorting algorithm based on provided data you have
search google with query: Comparison of Sorting Algorithms
if you have time dive in the following PDF:
use a static string variable declare it above Page_Load line like:
static string yourstrVariable = "";
it will hold its value which you can compare in the function
altenately you can store a string value inside session as well, and in the method, first check weather
the session value is null or not, if not, use it