Bloomberg interview question

Basic OOP concepts, difference between C++ and Java, Garbage collection, mark & sweep algorithm. Programming questions: 1. you are given a method signature for encrypting a character ( you don't know how it is implemented) char getCipherText(char c); (a) // implement the method encode to get an encrypted string using the above method private Static String encode(String str){ } (b) //implement method to decipher the text encoded using the above encryption method private Static String decode(String str){ } 2. private vector<int> input = {2,3,4,5,2,4,7,6...}; find all pairs of elements sum of which is equal to given target sum; for e.g if target sum is 8 your method should print {{2,6}, {3,5},{4,4}) etc... for both question: which data structure you would choose and why what is time complexity etc..