Amazon Interview Question

Write a program to find all possible pairs in array that sum up to X. With efficiency O(n). What is shared pointer? How will you say a tree is binary tree?Linked list has a loop?