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 8415869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:34:21+00:00 2026-06-10T01:34:21+00:00

ALGORITHM RIDDLE you get a number x and you have to set the all

  • 0

ALGORITHM RIDDLE

you get a number x and you have to set the all the from 1 to x twic in an array of size 2x.
the rule is the numbers have to be placed in a cell that is the difference from their value.
for example if you set the number 2 like this:
|2| | | | |
the bex one has to be like this:
|2| |2| | |

let’s say x=4, then we have an array of 8 cells and we can set the numbers like this:
1 2 3 4 5 6 7 8
|4|2|3|2|4|3|1|1|

you can place the number in various ways.

can you do the same for the number 10 (array size 20), 12(array size 24)?
if yes, show how, if not explain why for each number.

  • 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-06-10T01:34:23+00:00Added an answer on June 10, 2026 at 1:34 am

    This problem is NP-Complete you must try all possibilities to determine feasibility and to get a result set of possible solutions.

    If you want a yes/no answer to whether it can be done that is defined by the function 1/2(4n + (-1)^n - 1), plugging values of n starting at 1…infinity will give you the sequence of numbers that are yes answers. Proof not included 🙂

    To clarify, the solution set finding is NP-Complete and the yes/no answer for a given N can be done using the above formula. (I hope I haven’t fudged the math on that one, its a generating function)

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

Sidebar

Related Questions

I currently have an algorithm that generates a point grid. It takes input from
I have an algorithm which is executted in task from tpl. From each iteration
So I need an algorithm to generate all permutations of a list of numbers
Algorithm to generate all possible letter combinations of given string down to 2 letters
What algorithm would you suggest to identify how much from 0 to 1 (float)
My algorithm use a huge array of boolean , and as I was taught,
What algorithm I can use for problem like this: Have a graph positive weighted,
The Algorithm traverses a 2D NxN array, making every element the average of its
This is a design/algorithm question. Here's the outline of my scenario: I have a
I'm searching for improving my algorithm for an allocate massive data riddle. If anyone

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.