Swacblooms🦋

Making the Moves
Menu
  • Home
  • Motivation
  • Education
  • Programming
  • About
  • Contact
  • Privacy Policy
Home
Uncategorized
DNA Pairing
Uncategorized

DNA Pairing

Samson Amaugo March 29, 2019

The DNA strand is missing the pairing element. Take each character, get its pair, and return the results as a 2d array.

Base pairs are a pair of AT and CG. Match the missing element to the provided character.

Return the provided character as the first element in each array.

For example, for the input GCG, return [[“G”, “C”], [“C”,”G”],[“G”, “C”]]

The character and its pair are paired up in an array, and all the arrays are grouped into one encapsulating array.

Your code should satisfy the following conditions:

  • pairElement("ATCGA")should return [["A","T"],["T","A"],["C","G"],["G","C"],["A","T"]]
  • pairElement("TTGAG")should return [["T","A"],["T","A"],["G","C"],["A","T"],["G","C"]].
  • pairElement("CTCTA")should return [["C","G"],["T","A"],["C","G"],["T","A"],["A","T"]].

Try to establish your code using this function template:

Send link to your code in the comment section below. You can use any editor of your choice

Prev Article
Next Article

Related Articles

serving a vue js app from dotnet
Hey guys 👋👋, in this article, I will be describing …

Serving A VueJs App from DotNet

Using XDebug in Laravel Sail(VSCode)
Hi guys 👋🏾, in this article I will be writing …

Using XDebug in Laravel Sail (VSCODE)

About The Author

Samson Amaugo

I am Samson Amaugo. I am a full-stack developer and I specialize in DotNet and the MERN stack.

One Response

  1. Sammy

    This is a link to my code
    https://code.sololearn.com/WVrimQnw8Kqp

    March 29, 2019

Leave a Reply

Cancel reply

Search Site

Recent Posts

  • Running Entity Framework Migrations in an Aspire-Bootstrapped Orleans Project
  • Using XDebug in Laravel Sail (VSCODE)
  • Custom Redis Streams Provider for Orleans
  • Creating a Custom File Storage Provider for Microsoft Orleans
  • Incremental Generators In C#

Categories

  • EDUCATION
  • Motivation
  • Programming
  • Uncategorized

Get more stuff

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

we respect your privacy and take protecting it seriously

RSS Swacblooms

  • Running Entity Framework Migrations in an Aspire-Bootstrapped Orleans Project
  • Using XDebug in Laravel Sail (VSCODE)
  • Custom Redis Streams Provider for Orleans
  • Creating a Custom File Storage Provider for Microsoft Orleans
  • Incremental Generators In C#
  • Hot Chocolate Data Loader: A Quick Guide
  • Exploring Policy-Based Authorization in Minimal API with .NET 8
  • Using Cloud Firestore in Blazor WebAssembly
  • Serving A VueJs App from DotNet
  • Dynamic Subscriptions in Hot Chocolate 🔥🍫

Swacblooms🦋

Making the Moves
Copyright © 2025 Swacblooms🦋
Swacblooms - Making the Moves