/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) {} };*/ class Partition { public: ListNode* partition(ListNode* phead, int x) { // write code here struct ListNode* cur, *lesshead, *lesstail, *greaterhead, *greatertail; ...