top of page
Coding Solutions is a great section for every coder. You can get answers to your programming questions here by the Team ATC. You can even ask for the answer to competitive programming language questions as well. First, search your question here, and if not found. Then, ask your question to Ask The Code members, and you will get your answer in no time from the members of this Indian Developer Community. Happy Coding.
Search
Team ATC
Jul 31, 20212 min read
Tree - Find the smallest non-negative integer | AskTheCode
Tree...You are given a tree having A nodes numbered from 0 to A-1, rooted at node 0. Each node has a distinct value ranging between [0, A-1]
61 views0 comments

Team ATC
Jul 15, 20213 min read
WAP to Implement Matrix Chain Multiplication in C - AskTheCode
Write a C program to display the required minimum number of multiplicative operations for multiplying the given matrices...
37 views0 comments
Team ATC
Jul 5, 20213 min read
Dakimakura Distribition Codechef July Long Challenge Solution | AskTheCode
Only a few centuries later, the Berland government realized what was necessary for the country's prosperity. That's right, a dakimakura ...
276 views0 comments
Team ATC
Jul 4, 202110 min read
Madoka and Ladder Decomposition - Codechef July Long Challenge Solution
Madoka was given a tree on her coming of age, and not a simple one, but a rooted tree of n vertices with a root at the vertex with number...
284 views0 comments
Team ATC
Jul 3, 20217 min read
Even Odd Partition Codechef July Long Challenge Solution | AskTheCode
Let f(n) be the number of ways to partition the array [1,2,3,…,n] into contiguous sub-arrays such that every pair of adjacent sub-arrays ...
282 views0 comments
Team ATC
Jul 3, 20214 min read
Chef and Pairs Codechef - July Long Challenge Solution in C++
You are given a tree (connected, undirected, acyclic graph) consisting of N nodes. Based on this tree, you have to answer Q queries ...
519 views0 comments
Team ATC
Jul 2, 20213 min read
K Path Query - Codechef Solution | AskTheCode
You're given a tree with N vertices numbered from 1 to N. Your goal is to handle Q queries. For each query you are given K nodes v1,v2,…,vK.
1,157 views0 comments
Team ATC
Jul 2, 20212 min read
XxOoRr - Codechef July Long Challenge Solution in C++ | AskTheCode
Given an array A1,A2…AN, find the minimum number of operations (possibly zero) required to convert all integers in A to 0...
698 views0 comments
Team ATC
Jul 2, 20212 min read
Maximum Production - Codechef Solution in C++ | AskTheCode
Chefland has 7 days in a week. Chef is very conscious about his work done during the week. There are two ways he can spend his energy ...
126 views0 comments
Team ATC
Jun 30, 20212 min read
Small Triangles Large Triangles - HackerRank Solution in C | AskTheCode
You are given n triangles, specifically their sides ai, bi & ci. Print them in the same style but sorted by their areas from the smallest...
90 views0 comments
Team ATC
Jun 25, 20212 min read
A smallest number - June Circuits '21 HackerEarth solution | AskTheCode
You are given an integer K. Find the smallest number N such that N has exactly K digits and none of the digits in N is $$0$$. Also, ...
108 views0 comments
Team ATC
Jun 24, 20212 min read
David is fighting Goliath (again) - MOOC assignment from Edx solution
Write a program that takes several lines of input from a user (see the below example). The first line of the input indicates the number ...
66 views0 comments
Team ATC
Jun 20, 20213 min read
Too Much Xor Codechef Solution in C++| AskTheCode
Chef calls a sequence of integers A1,A2,…,ANgood if it satisfies the following conditions: In particular, any sequence with length 1... more
155 views0 comments
Team ATC
Jun 20, 20211 min read
The Wave Codechef Solution in C++ | AskTheCode
Chef is stuck in the wavey world of polynomials. You are given all N roots of a polynomial P(x)=∏Ni=1(x−ai)...
198 views0 comments
Team ATC
Jun 20, 20212 min read
Chefland Visa Codechef Solution - AskTheCode
Ash is trying to get visa to Chefland. For the visa to be approved, he needs to satisfy the following three criteria: Solve at least x1...
124 views0 comments
Team ATC
Jun 8, 20213 min read
Shortest Route Codechef Solution | AskTheCode
There are N cities in Chefland numbered from 1 to N and every city has a railway station. Some cities have a train and each city... more
824 views2 comments
Team ATC
Jun 8, 20212 min read
Bitwise Tuples - Codechef Solution -| AskTheCode
Chef has two numbers N and M. Help Chef to find number of integer N-tuples (A1,A2,…,AN) such that 0≤A1,A2,…,AN≤2M−1 and A1&A2&…&AN=0... more
917 views0 comments
Team ATC
Jun 6, 20212 min read
Bella ciao - Codechef Solution | AskTheCode
Chef is planning a heist in the reserve bank of Chefland. They are planning to hijack the bank for D days and print the money...more
1,186 views1 comment
Team ATC
Jun 6, 20212 min read
Summer Heat Codechef Solution in C++ and Java - AskTheCode
Chefland has 2 different types of coconut, type A and type B. Type A contains only xa milliliters of coconut water and type B contains...
292 views0 comments
Team ATC
May 12, 20212 min read
Simple calculator program in c++ using functions & do-while loop - AskTheCode
Simple calculator program in c++ using functions...Write a simple calculator program in C++ for basic computations...
122 views0 comments
bottom of page