unsigned long normalise(unsigned long input_time)
 {
 
     bool finished;
 
     // This produces a formatted time string like:
     // Thu_Nov_24_18:22:48_1986
     string str_time = format_time( input_time );
 
     while( str_time.substr(1,3) != "Sun")
     {
         input_time -= 24*60*60;
         str_time = format_time( input_time );
     }
 
     while( str_time.substr(11,2) != "00" )
     {
         input_time -= 60*60;
         str_time = format_time( input_time );
     }
 
     while( str_time.substr(14,2) != "00")
     {
         str_time = format_time( input_time );
         input_time -= 60;
     }
 
     while( str_time.substr(17,2) != "00")
     {
         input_time -= 1;
         str_time = format_time( input_time );
     }
 
     return input_time;
 }

Using any programming language of your choice, implement algorithms to:


a) Reverse a string

b) Sort an array of Integers

Member Avatar for iamthwee

I'm getting a feeling of de ja vu?

hey man i appreciate ur help n time , i realy do , but this is exactly how i got the question , sorry ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.