Salesforce Interview Questions
- 0of 0 votes
AnswersSay that you have p1(Child) - > a & b and p2 (Child) -> c & d. Which return list p1 and p2 child and see p1 and p2 are related. We need to check if they going over the tree.
- Manoj May 08, 2021 in India
Inupt assumption is : p1 -> a & b
p2 -> c & d
a - it own parent & b - it own parent
c - it own parent & d - it own parent and so on.| Report Duplicate | Flag | PURGE
Salesforce Software Engineer / Developer - 0of 0 votes
AnswersGiven a set of integers, the task is to divide it into two sets S1 and S2 such that the absolute difference between their sums is minimum.
- Anon February 09, 2020 in United States
If there is a set S with n elements, then if we assume Subset1 has m elements, Subset2 must have n-m elements and the value of abs(sum(Subset1) – sum(Subset2)) should be minimum.| Report Duplicate | Flag | PURGE
Salesforce Software Engineer - 0of 0 votes
AnswersCode an algorithm for a game consisting of two players. The input is a positive integer x. Each round, a player deducts a perfect square from the number. The player can choose any perfect square as long as it is less than or equal to the current number and greater than 0. The current player wins if the number becomes 0 after his deduction.
- Thomas June 19, 2019 in United States| Report Duplicate | Flag | PURGE
Salesforce SDE-2 Dynamic Programming - 0of 0 votes
AnswersYour program will simulate the creation of
- asrikanth.125 November 18, 2016 in United States
subdirectories (folders) on one of the disks of a
computer. The input file to your program,
prog5.dat, will contain a sequence of commands
that a user might enter from a command line, and
the output file prog5.out will contain the
operating system’s responses to these commands.
Below is an example of an input file, and on the
right is the listing of the corresponding output
file.
dir
mkdir sub6
mkdir sub3
mkdir sub4
dir
mkdir sub4
cd sub3
cd sub3
mkdir sub3
mkdir sub6
mkdir sub4
dir
cd sub6
mkdir sub666
dir
up
up
dir
up
Problem 5 by team X
Command: dir
Directory of root:
No subdirectories
Command: mkdir sub6
Command: mkdir sub3
Command: mkdir sub4
Command: dir
Directory of root:
sub3 sub4 sub6
Command: mkdir sub4
Subdirectory already exists
Command: cd sub3
Command: cd sub3
Subdirectory does not exist
Command: mkdir sub3
Command: mkdir sub6
Command: mkdir sub4
Command: dir
Directory of root\sub3:
sub3 sub4 sub6
Command: cd sub6
Command: mkdir sub666
Command: dir
Directory of root\sub3\sub6:
sub666
Command: up
Command: up
Command: dir
Directory of root:
sub3 sub4 sub6
Command: up
Cannot move up from root directory
End of problem 5 by team X| Report Duplicate | Flag | PURGE
Salesforce Software Developer Algorithm - 0of 0 votes
AnswersAdd a node to sorted circular linked list
- Blank October 29, 2016 in United States for Infrastructure| Report Duplicate | Flag | PURGE
Salesforce Intern Data Structures - 0of 0 votes
AnswersYou have a string aaabbdcccccf, transform it the following way => a3b2d1c5f1
- Blank October 29, 2016 in United States for Infrastructure
ie: aabbaa -> a2b2a2 not a4b2| Report Duplicate | Flag | PURGE
Salesforce Intern String Manipulation - 0of 0 votes
AnswersFind a 1st non-repeated char in the string for e.g. if string is "Salesforce is the best company to work for” returns 'l'
- eminsqa January 27, 2016 in United States| Report Duplicate | Flag | PURGE
Salesforce Quality Assurance Engineer Algorithm Java - 0of 0 votes
AnswersThere are three threads in a process.
- jim.shan.JS May 15, 2015 in United States
The first thread prints 1 1 1 …, the second one prints 2 2 2 …, and the third one prints 3 3 3 … endlessly.
How do you schedule these three threads in order to print 1 2 3 1 2 3 …?| Report Duplicate | Flag | PURGE
Salesforce Software Engineer Threads - 0of 0 votes
AnswersGiven a array of integer and group size, reverse array by group size, example as follows:
- HBY May 08, 2015 in United States
[1, 2, 3, 4, 5, 6], 1 -> [1, 2, 3, 4, 5, 6]
[1, 2, 3, 4, 5, 6], 2 -> [2, 1, 4, 3, 6, 5]
[1, 2, 3, 4, 5, 6], 3 -> [3, 2, 1, 6, 5, 4]
[1, 2, 3, 4, 5, 6, 7, 8], 3 -> [3, 2, 1, 6, 5, 4, 8, 7]
Design test cases for you API| Report Duplicate | Flag | PURGE
Salesforce SDET Algorithm - 0of 0 votes
Answers2> write program to mirror the binary tree.
- shailendra.rajput January 17, 2015 in India| Report Duplicate | Flag | PURGE
Salesforce Developer Program Engineer Algorithm - 1of 1 vote
Answers1> write program to calculate power(x,n) in log(n) time
- shailendra.rajput January 17, 2015 in India| Report Duplicate | Flag | PURGE
Salesforce Developer Program Engineer Algorithm - 0of 0 votes
AnswersThere is a one test case on a ui side i.e a form that you entered incorrect data. It will throw an error meassage
- kancharlaratna December 21, 2014 in United States
i.e a failed test case. It works on the test envoronment.
But it fails on ci tool jenkins. Onlly the failed testcase fails on build tool. How do you debug the issue? Logs and test environment it works?| Report Duplicate | Flag | PURGE
Salesforce Quality Assurance Engineer Testing - 0of 0 votes
Answer2) I have a large sets of test data(lbulk records). How will you handle in automation frame work?
- kancharlaratna December 21, 2014 in United States| Report Duplicate | Flag | PURGE
Salesforce Quality Assurance Engineer Testing - 0of 0 votes
AnswersI have a few questions on automation framework(that was asked in the interview).
- kancharlaratna December 21, 2014 in United States
I have 1000 test cases. I am adding a test case in
1) I have 1000 test cases. I am adding a test case in the middle (501). What are some of the issues you faced in the framework?idata related)| Report Duplicate | Flag | PURGE
Salesforce Quality Assurance Engineer Testing - 0of 0 votes
AnswersGiven a string, return the string with the words reversed
- Bryan.S.Lam February 26, 2014 in United States for Quality Engineer Intern
"I am good" -> "good am I"
List test cases and if you were crunched on time and only had time to test one test case, which would you pick| Report Duplicate | Flag | PURGE
Salesforce Intern Algorithm - 2of 2 votes
AnswersWrite an application in Java to simulate file system. For e.g. implement commands: ls -l (list contents of director sorted by name), cd .. (to go to parent directory), pwd to return the complete path to current directory etc. It was a 2 hour remote programming test.
- techpanja February 13, 2014 in United States
Your system will have Directory and Files. A directory can contain files and other directories.| Report Duplicate | Flag | PURGE
Salesforce Software Engineer / Developer - 2of 4 votes
Answersfind the substring count from a string without string functions in java?
- Neo March 05, 2013 in United States
Given String str = "abcdefghcde";
String find = "cde";
Count occurrences of cde in String str| Report Duplicate | Flag | PURGE
Salesforce Software Engineer Intern Java - 0of 0 votes
AnswersWrite a java program thats takes a string and a character as input and return the string without that character. Do not use repalce function. For eg google, g should return oole
- Anil February 13, 2013 in United States| Report Duplicate | Flag | PURGE
Salesforce Testing / Quality Assurance - 0of 0 votes
AnswersWrite the recursive implementation of DFS and BFS for an n-ary tree. Tree node has an int data item, and a linked list "children" of nodes.
- CartmanIncarnate October 07, 2012 in United States| Report Duplicate | Flag | PURGE
Salesforce Software Engineer / Developer Trees and Graphs - 0of 0 votes
AnswersGiven a string generate permutations of all possible lengths and print them in any order.
- omkar86 September 18, 2012 in United States
Now print the permutations in dictionary order.| Report Duplicate | Flag | PURGE
Salesforce - 0of 0 votes
Answersclass ex
- sekhar740 September 23, 2011 in India
{
int i;
public:
ex(int ii = 0):i(ii){}
~ex(){cout<<"dest"<<endl;}
void show()
{
cout<<"show fun called"<<endl;
}
};
int main(int argc , char *argv[])
{
ex *ob = NULL;
ob->show();
return 0;
}
what happens when we call show method.| Report Duplicate | Flag | PURGE
Salesforce Developer Program Engineer C++ - 0of 0 votes
AnswersHow to replace the space in the string with "ABC" without using extra memory.. string may contain some extra memory.
- sekhar740 September 23, 2011 in India
str = "i am chandu" -- str contation more memory...
str = "iABCamABCchandu"| Report Duplicate | Flag | PURGE
Salesforce Developer Program Engineer String Manipulation - 0of 0 votes
AnswersWrite a program to reverse a character array "Hello World". Give different test cases(input arrays) to test your code.
- merry September 21, 2011 in United States for Quality Engineering| Report Duplicate | Flag | PURGE
Salesforce Quality Assurance Engineer Java Testing - 0of 0 votes
AnswersWrite a program to find the smallest number from an array with elements{1,10, -5, 10} Write the test cases for it(Give different input arrays to test ur code)
- merry September 21, 2011 in United States for Quality Engineering| Report Duplicate | Flag | PURGE
Salesforce Quality Assurance Engineer Java Testing - 0of 0 votes
AnswersGet the max sum if you are given a chance to go first.
- Anonymous April 22, 2011
You have a list of coins, Example {12, 24, 10, 5}
You can only pick the end coins, either 12 or 5 in the fist pass and so on.| Report Duplicate | Flag | PURGE
Salesforce Software Engineer / Developer - 0of 0 votes
Answerswhat every one knows is one Fibonacci series which adds the previous 2 numbers i.e fib(n) = fib(n-1)+ fib(n-2). but there many Fibonacci series which adds the previous 2 numbers, previous 3 numbers and so on. so write a function fib(n,k) which gives you first n numbers of a Fibonacci series and k is the number of previous numbers you have to add ex. for fib(n,3) you have to add fib(n-1)+ fib(n-2)+ fib(n-3).
- C++_in_my_blood March 16, 2009| Report Duplicate | Flag | PURGE
Salesforce Software Engineer / Developer Algorithm