Add office photos
Salesforce logo
Employer?
Claim Account for FREE

Salesforce

4.0
based on 862 Reviews
Video summary
Filter interviews by
Member Technical Staff
Fresher
Clear (1)

Salesforce Member Technical Staff Interview Questions and Answers

Updated 7 Mar 2024

Q1. Buy and Sell Stock Problem Statement

Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell transa...read more

Ans.

The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.

  • Iterate through the array of stock prices to find the maximum profit that can be achieved by buying and selling stocks at different points.

  • Keep track of the maximum profit that can be achieved by considering all possible combinations of buy and sell transactions.

  • Ensure that you sell the stock before buying again to adhere to the con...read more

Add your answer
right arrow

Q2. Optimal Strategy for a Coin Game

You are playing a coin game with your friend Ninjax. There are N coins placed in a straight line.

Here are the rules of the game:

1. Each coin has a value associated with it.
2....read more
Ans.

The problem involves finding the optimal strategy to accumulate the maximum amount in a coin game with specific rules.

  • Start by considering the base cases where there are only 1 or 2 coins.

  • Use dynamic programming to keep track of the maximum amount that can be won at each step.

  • Consider the different scenarios when choosing a coin from either end of the line.

  • Keep track of the total winnings for both players and choose the optimal strategy to maximize your winnings.

  • Implement a r...read more

Add your answer
right arrow
Salesforce Member Technical Staff Interview Questions and Answers for Freshers
illustration image

Q3. Longest Happy String Problem Statement

Given three non-negative integers X, Y, and Z, determine the longest happy string. A happy string is defined as a string that contains only the letters 'a', 'b', and 'c' w...read more

Ans.

The longest happy string problem involves constructing a string with 'a', 'b', and 'c' without having any three consecutive letters being the same.

  • Determine the maximum number of times 'a', 'b', and 'c' can appear in the string based on the given input values.

  • Construct the longest happy string by alternating between 'a', 'b', and 'c' while respecting the constraints.

  • Return '1' if a correct happy string can be formed, otherwise return '0'.

Add your answer
right arrow

Q4. Spiral Matrix Problem Statement

You are given a N x M matrix of integers. Your task is to return the spiral path of the matrix elements.

Input

The first line contains an integer 'T' which denotes the number of ...read more
Ans.

The task is to return the spiral path of elements in a given matrix.

  • Iterate through the matrix in a spiral path by keeping track of boundaries.

  • Print elements in the order of top row, right column, bottom row, and left column.

  • Continue the spiral path until all elements are printed.

Add your answer
right arrow
Discover Salesforce interview dos and don'ts from real experiences

Q5. Cycle Detection in a Singly Linked List

Determine if a given singly linked list of integers forms a cycle or not.

A cycle in a linked list occurs when a node's next points back to a previous node in the list. T...read more

Ans.

Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.

  • Traverse the linked list using two pointers, one moving one step at a time and the other moving two steps at a time.

  • If the two pointers meet at any point, there is a cycle in the linked list.

  • Use Floyd's Cycle Detection Algorithm for efficient detection of cycles in linked lists.

Add your answer
right arrow

Q6. Minimum Swaps to Sort Array Problem Statement

Given an array arr of size N, determine the minimum number of swaps required to sort the array in ascending order. The array consists of distinct elements only.

Exa...read more

Ans.

The minimum number of swaps required to sort an array of distinct elements in ascending order.

  • Use a hashmap to store the index of each element in the array.

  • Iterate through the array and swap elements to their correct positions.

  • Count the number of swaps needed to sort the array.

Add your answer
right arrow

Q7. Deep diving into current project works

Ans.

I am currently working on developing a new feature for our company's website to improve user experience.

  • Researching user feedback and analyzing data to identify areas for improvement

  • Collaborating with designers and developers to create wireframes and prototypes

  • Implementing and testing the new feature to ensure functionality and usability

  • Gathering feedback from users through surveys and usability testing

  • Iterating on the feature based on feedback and data analysis

Add your answer
right arrow

More about working at Salesforce

Back
Awards Leaf
AmbitionBox Logo
#12 Best Mid-Sized Company - 2022
Awards Leaf
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Salesforce Member Technical Staff

based on 5 interviews
2 Interview rounds
Coding Test Round
Technical Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Member Technical Staff Interview Questions from Similar Companies

Zoho Logo
4.3
 • 16 Interview Questions
View all
Recently Viewed
SALARIES
Commonwealth Bank of Australia, India
INTERVIEWS
Jamboree Education
No Interviews
INTERVIEWS
Krishak Bharati Cooperative
No Interviews
SALARIES
Worldline
JOBS
Birla Open Minds Education Private Limited
No Jobs
JOBS
Indira Securities
No Jobs
JOBS
Premier People Logistics Solution
No Jobs
SALARIES
Worldline
JOBS
Optimum Infosystem
No Jobs
SALARIES
Citrix R&d India Pvt. Lit
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter