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

The Archive Base Latest Questions

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

I am using Visual C# 2010 Express. I have an array of students that

  • 0

I am using Visual C# 2010 Express. I have an array of students that tells me which pair of students have worked together in the past. So, arrStudents(0,0) might contain Joe and arrStudents(0,1) contains Bob, and sometimes vice versa. The order in which the names are recorded doesn’t matter, it’s just the pairing information that I care about.

Example:

Joe - Bob
Mary - Bob
Bob - Joe
Mary - Joe
Jack - Mary
Joe - Bob

What method should I use to identify all distinct pairs and to count how many times it occurred?

So, since (Joe – Bob) and (Bob – Joe) are the same pair the results should yield:

Joe - Bob, 3
Mary - Bob, 1
Mary - Joe, 1
Jack - Mary, 1
  • 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-10T20:29:22+00:00Added an answer on June 10, 2026 at 8:29 pm

    I’d create a Dictionary, where the key is a student-pair and the value is the count. Then iterate through all the pairs and add them to the dictionary. For each pair, sort the names alphabetically (or whatever) so that both “Joe-Bob” and “Bob-Joe” end up as “Bob-Joe”. If the pair already exists in the dictionary, increment the corressponding value by 1. If it doesn’t, add it and set the value to 1. In the end, just iterate through the dictionary and you’ll have your results.

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

Sidebar

Related Questions

I'm using Visual Basic 2010 Express. I have a form that can be minimized.
I am using Visual C# Studio 2010 Express and I have oakward problem. I
I am using visual c# express 2010. I need an installer that will allow
I have just installed Visual C++ 2010 Express and I have the impression that
Friends I have been using Microsoft Visual C++ 2010 Express edition and also downloaded
I am using Microsoft Visual C# 2010 Express. I did not have access to
I am using visual studio 2010 Express. I have created a website in asp.net.It
I'm using Visual C# 2010 Express. I have 2 Lists of zip codes each
Im using Visual C# 2010 express. Im working on a game, and have come
im writing an application using Visual Studio 2010 Express Edition. I have a problem

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.