/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) {} };*/ #include <cstddef> class Partition { public: ListNode* partition(ListNode* pHead, int x) { struct ListNode* gGuard,*gTail,*lGuard,*lTail; struct ListNode*cur = pHead; gGuard = gTail = (struct List...