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*head1,*head2,*tail1,*tail2; head1=tail1=(struct ListNode*)malloc(sizeof(struct ListNode)); head2=t...