/* 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 *lesshead, *lesstail, *greaterhead, *greatertail; lesshead = lesstail = (struct ListNode*...