Given a string, write a program to reverse the order of words without using built-in library functions. Treat any sequence of whitespace characters as a separator, discard leading and trailing whitespace, and return words separated by one space. Implement def reverse_words(s):, where s is a string and the result is a string. Do not use split(), join(), reverse(), or reversed().
def reverse_words(s):