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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:18:30+00:00 2026-05-17T22:18:30+00:00

I asked this question in the chat room. but no answer so i am

  • 0

I asked this question in the chat room. but no answer so i am posting the question here.

The question is, for example take the word abcd

it has 4 charcters. by adding the ‘ . ‘ in between the characters you can write it as a.b.c.d

rules
can use only 1 dot between characters
can use multiple dots in the word
Edit: there can be characters without ‘ . ‘ in between them. eg (ab or abcd)
cannot use dot at the beginning or end of the word ie .abcd or abcd. are false

some of the answers
a.b.c.d
a.bcd
ab.cd
abc.d
a.b.cd
a.bc.d
ab.c.d
abc.d

how many word are possible to make. how to write a program to find it in c# ?

Edit
how to display each possible word ?

  • 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-17T22:18:31+00:00Added an answer on May 17, 2026 at 10:18 pm

    You can do it recursively.

    All possible combinations of (abcd) are:

    a + . + all combinations of (bcd)
    ab + . + all combinations of (cd)
    abc + . + all combinations of (d)
    abcd
    

    Code:

    public static IEnumerable<string> GetCombinations(string str) {
      for (int i = 1; i < str.Length; i++) {
        foreach (string s in GetCombinations(str.Substring(i))) {
          yield return str.Substring(0, i) + "." + s;
        }
      }
      yield return str;
    }
    

    Usage:

    foreach (string s in GetCombinations("abcd")) Console.WriteLine(s);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I originally asked this question , but in finding an answer, discovered that my
(I asked this question in another way , and got some interesting responses but
I asked this question before, Here however I think I presented the problem poorly,
I asked this question a while back but now I'm looking to implement an
I originally asked this question on RefactorMyCode , but got no responses there... Basically
I asked this question a while ago and got an answer that I thought
I asked this question and got an excellent answer (thanks!). Part of the problem
I asked this question yesterday. But now I realize it was the wrong question.
I asked this question previously: Disabling and Re-Enabling Dynamic Form Elements with JQuery but
Having asked this question and received a very satisfactory answer, I now wish in

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.