Cognizant vs Salesforce Interview Questions

Cognizant lists 29 LeetCode interview questions while Salesforce lists 188. They share 8 problems — 28% of Cognizant's bank and 4% of Salesforce's. Focus on the overlap first, then drill into 21 Cognizant-only and 180 Salesforce-only questions.

Overview

Cognizant

29 questions

Easy 18Medium 10Hard 1
Salesforce

188 questions

Easy 25Medium 112Hard 51

Preparation Strategy

Step 1 — Shared core: Solve the 8 overlapping problems first. These are the highest-yield questions for candidates interviewing at both Cognizant and Salesforce.

Step 2 — Company-specific depth: Add Cognizant-specific problems like Palindrome Number, Count Subarrays of Length Three With a Condition, Smallest Value of the Rearranged Number and Salesforce-specific problems from the exclusive lists below.

Step 3 — Difficulty tuning: Salesforce skews harder in our data. Budget extra time for Hard problems if you are targeting that company.

Difficulty Comparison

Easy
Cognizant
18
Salesforce
25
Medium
Cognizant
10
Salesforce
112
Hard
Cognizant
1
Salesforce
51

Top Shared Topics

8 Shared Questions

High-priority problems to practice for both Cognizant and Salesforce.

ProblemDifficulty
Two SumEasy
Longest Palindromic SubstringMedium
Maximum SubarrayMedium
Valid ParenthesesEasy
Median of Two Sorted ArraysHard
Longest Substring Without Repeating CharactersMedium
3SumMedium
Merge Two Sorted ListsEasy

Unique to Cognizant (21)

Problems in Cognizant's list that do not appear at Salesforce.

ProblemDifficulty
Palindrome NumberEasy
Count Subarrays of Length Three With a ConditionEasy
Smallest Value of the Rearranged NumberMedium
Fibonacci NumberEasy
Valid AnagramEasy
Second Highest SalaryMedium
Remove Duplicates from Sorted ArrayEasy
Longest Common PrefixEasy
Managers with at Least 5 Direct ReportsMedium
Reverse IntegerMedium
Product Sales Analysis IEasy
Merge Sorted ArrayEasy

Unique to Salesforce (180)

Problems in Salesforce's list that do not appear at Cognizant.

ProblemDifficulty
Minimum Operations to Reduce an Integer to 0Medium
String CompressionMedium
Time Needed to Rearrange a Binary StringMedium
LFU CacheHard
Closest Equal Element QueriesMedium
Smallest Substring With Identical Characters IHard
Smallest Substring With Identical Characters IIHard
Remove Adjacent Almost-Equal CharactersMedium
Subarray Product Less Than KMedium
Maximum Palindromes After OperationsMedium
LRU CacheMedium
Maximum Number of Occurrences of a SubstringMedium

Frequently Asked Questions

How many LeetCode questions do Cognizant and Salesforce share?

Cognizant and Salesforce share 8 LeetCode interview questions. 21 problems appear only in Cognizant's list and 180 appear only in Salesforce's list.

What topics overlap most between Cognizant and Salesforce?

The most common shared topics between Cognizant and Salesforce are Array (4 shared questions), String (3 shared questions), Hash Table (2 shared questions), Two Pointers (2 shared questions), Dynamic Programming (2 shared questions). Mastering these areas prepares you for both companies.

Which company asks harder LeetCode questions: Cognizant or Salesforce?

Cognizant has 18 Easy, 10 Medium, and 1 Hard questions. Salesforce has 25 Easy, 112 Medium, and 51 Hard questions. Salesforce has a higher proportion of Hard problems in its interview set.

How should I prepare if interviewing at both Cognizant and Salesforce?

Start with the 8 shared problems since they cover what both companies ask most often. Then add 20 Cognizant-specific and 20 Salesforce-specific questions to round out your prep.

Explore More