Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7668899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:28:26+00:00 2026-05-31T15:28:26+00:00

Given 4 arrays that can contain positive and negative numbers. find all possible sets

  • 0
  • Given 4 arrays that can contain positive and negative numbers.
  • find all possible sets with one number from each array (ie each set will contain 4 numbers ) such that sum of 4 numbers is zero.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:28:27+00:00Added an answer on May 31, 2026 at 3:28 pm

    Adrian just hasn’t thought far enough 🙂

    Loop through array 1 and 2 and add all sums to a map.

    Now from the other 2 arrays find all combinations which add up to a number in the map which you got from array 1 and 2. It’s pretty straight forward. Let me know if you need some pseudocode.

    O(n^2) runtime

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given two arrays A[n] and B[m] , how can I find the smallest window
I have an array that can contain any number of elements. Each element contains
Given the array, i need to find how many monotonically increasing Sub-arrays there are
I would like to store and load numpy arrays from binary files. For that
I want to build a TreeModel from some List s that contain the source
I have been given some 'reports' from another piece of software that contains data
1) Given an array of integers (negative and positive) - what is the most
I have a homework question that says: Problem 1: Given the array [ 22
I was reading a book when I found that array size must be given
QUESTION: Given a cell index (red) compute the array index (black) that surround the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.