Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Coding Round:
- The coding round was held in HackerRank with 2 coding questions and 10 mcq questions(covered os,dbms,oop) for 1hr.
- Question 1: You are given an array(even size) of positive integers , there are two players and you are one of them. The players can take an integer from the array which are at either end of the array. Both of the players play optimally and you will take the first move. Output the maximum sum you can gather.
- input : 4 2 7 8
- output : 12
- Quetion 2:Given a sequence of parenthesis, give the minimum number of changes(change '{' to '}' and vice versa) required to make a balanced parenthesis. If it is not possible to make a balanced parenthesis then output "-1".
- input : }{{{{}
- output: 3
- input :{{{
- output: -1
- Tecnical Round 1:
- (OOP in c++)
- What is a virtual pointer ?
- What is the difference between a shared pointer and a scope pointer ?
- What are virtual functions ?
- What is the practical implentation and usefulness of virtual functions ?
- (Problem solving)
- Given a matrix Mat[][] filled with integers print the indices(i,j) where the sum of all the integers left to (i,j) = sum of all the integers above (i,j) = sum of all the integers below (i,j) = sum of all the integers right to (i,j);
- Given a binary tree how can we do the level wise traversal(left to right) from the source to leaf nodes?
- Given a binary tree how can we do the level wise traversal(left to right) from the leaf nodes to source?
- (Other questions)
- Which data structures are you aware of?
- How can you add optimization in your code if you receive TLE even if the algo is appropriate?
- (eg. fast i/o , inline functions)
- Technical Round 2:
- Write a code for the spiral order traversal in binary tree.
- How can we implement HashMap and also write a code to create a hash for a given key and value.
- Round 3:
- What do you like about salesforce? How was the experience so far ? What is your best topic of interest ? Blah .. blah
- Why do you prefer c++ over java?
- why java is slower than c++?
- why there is no concept of pointers in java?
- Tell 3 disadvantages of using pointers ?
- What is a pointer to pointer? What is its practical requirement?
- Suggestion :
- Practice coding.
- Try to do some significant projects.
- Study OOP,OS,DBMS,Data Structutrs and algos.
- Stay humble and confident in front of the interviewers.
- Don't guess, accept that you don't know if something is asked beyond your scope.
- All the best!
- Chat conversation end
- Type a message...
Add Comment
Please, Sign In to add comment