FastPrepCount Plus and Minus Sign Patterns
Problems/Count Plus and Minus Sign Patterns

Count Plus and Minus Sign Patterns

Adobe logoAdobe● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: You count the plus and minus sign patterns that make a list of numbers add up to a target. The only report is a post from June 2025 about a June 2022 off-campus Adobe process. The task, named by its usual title, closed a first round of three coding questions plus CS fundamentals. The author says they wrote a full coded answer, and the post files the task under dynamic programming. No rules, limits or examples are given beyond the name.

The rules are those of the named task. Each number takes one sign, and a 0 counts with both signs. We chose these limits: 1 to 20 numbers from 0 to 1000 that add up to at most 1000, and a target from -1000 to 1000. We wrote new examples.

Our version is about 90% the same as the reported question.

You are given an integer array nums and an integer target. Put a plus sign or a minus sign in front of every number of nums, then add up all the signed numbers.

Return how many of the possible sign choices give a total equal to target. Every number gets its own sign, so for a 0 the plus and minus choices count as two different choices.

Function

countSignWays(nums: int[], target: int) → int

Examples

Example 1

nums = [3,1,2]target = 0return = 2

The signs must split the numbers into two groups with equal sums. +3 -1 -2 and -3 +1 +2 both give 0, and no other choice does, so the answer is 2.

Example 2

nums = [2,0,4]target = 6return = 2

Both 2 and 4 must get a plus sign. The 0 can take either sign without changing the total, so there are 2 choices: +2 +0 +4 and +2 -0 +4.

Example 3

nums = [5,5]target = 3return = 0

The possible totals are 10, 0 and -10. None of them is 3, so the answer is 0.

Constraints

  • 1 <= nums.length <= 20
  • 0 <= nums[i] <= 1000
  • 0 <= sum(nums) <= 1000
  • -1000 <= target <= 1000

More Adobe Phone Screen questions

  • Evaluate a Parenthesized Integer ExpressionPHONE SCREEN · Seen Oct 2026
  • All Elements of Two BSTs in OrderPHONE SCREEN · Seen Aug 2026
  • Rotate an Array In PlaceOA · PHONE SCREEN · Seen Aug 2026
  • Binary Tree Level-Order Traversal by LevelsPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Count Occurrences in a Sorted ArrayPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Count Pairs with Absolute Difference KPHONE SCREEN · Seen Jul 2026
  • Count Subsets with Sum KPHONE SCREEN · Seen Jul 2026
  • Numbers with Exactly Three DivisorsPHONE SCREEN · Seen Jul 2026
  • Sum of Even Nodes on a Path in a Numbered Binary TreePHONE SCREEN · Seen Jul 2026
  • Largest Value in Every Sliding WindowPHONE SCREEN · Seen Jul 2026

Similar questions at other companies

  • Winning Draws for a Mahjong HandZip · PHONE SCREENZip interview questions
  • Word Break IIAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Word Break IIBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Count Complete Tic-Tac-Toe GamesDecagon · PHONE SCREEN · ONSITE INTERVIEWDecagon interview questions
  • Longest Increasing SubsequenceByteDance · PHONE SCREENByteDance interview questions
  • Jump GamePaytm · PHONE SCREENPaytm interview questions
  • Query Words Within K PositionsPalantir · PHONE SCREENPalantir interview questions
  • House RobberVisa · PHONE SCREENVisa interview questions
  • SubsetsTemu · PHONE SCREENTemu interview questions
  • Longest Increasing SubsequenceAngel One · PHONE SCREEN

Interview reports that mention this question

  • Adobe New Grad MTS Interview Questions: 7 Experiences

Adobe interview experiences

  • Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 of 3)
  • Adobe SWE Interviews, Level Unknown: 25 Experiences (Part 2 of 3)
  • Adobe Interviews, Level Unknown: 38 Experiences (Part 1 of 3)
  • Adobe ML/Research Intern Interviews: 12 Experiences (Part 4 of 4)
  • Adobe Product Intern Interviews: 15 Experiences (Part 3 of 4)
All Adobe interview questionsSee Adobe hiring insights
Saved
class Solution {
    public int countSignWays(int[] nums, int target) {
        // Write your code here.
    }
}
Checking account…