/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) {} };*/ class Partition { public: ListNode* partition(ListNode* pHead, int x) { ListNode* lesshead, * lesstail, * greaterhead, * greatertail; lesshead = lesstail = (ListNode*)malloc(sizeof(...