Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SLLNode<String> tmp = current.firstChild;
- SLLNode<String> tmp2;
- while (tmp.sibling != null) {
- tmp2 = tmp.sibling;
- while (tmp2 != null) {
- if (tmp.element.compareTo(tmp2.element) > 0) {
- SLLNode<String> tmp3 = current.firstChild;
- while (tmp3.sibling != tmp) {
- tmp3 = tmp3.sibling;
- }
- tmp3.sibling = tmp2;
- tmp2.sibling = tmp.sibling;
- tmp.sibling.sibling = tmp;
- tmp.sibling = tmp2.sibling;
- }
- tmp2 = tmp2.sibling;
- }
- tmp = tmp.sibling;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement