Refactored levelorderTravesal and levelorderWithSeparatorTravesal so that they call the common extractFrontNodeValAddChildren function. The function extracts the front node and add its children into the queue. Return the node's value formatted to string