## Welcome to Java! Easy Max Score: 3 Success Rate: 97.06%

Java stdin and stdout i easy java (basic) max score: 5 success rate: 96.92%, java if-else easy java (basic) max score: 10 success rate: 91.31%, java stdin and stdout ii easy java (basic) max score: 10 success rate: 92.58%, java output formatting easy java (basic) max score: 10 success rate: 96.58%, java loops i easy java (basic) max score: 10 success rate: 97.69%, java loops ii easy java (basic) max score: 10 success rate: 97.33%, java datatypes easy java (basic) max score: 10 success rate: 93.67%, java end-of-file easy java (basic) max score: 10 success rate: 97.91%, java static initializer block easy java (basic) max score: 10 success rate: 96.17%.

## 6 Problem-Solving HackerRank Questions and Answers for Your Interview

Team CodeQuotient / December 18, 2022 / Software Engineering Bootcamp

HackerRank is a tech company that provides a common platform for programmers and tech companies where people can participate in coding challenges (such as hackathons) or create their own. Most importantly, you can directly land a job from HackerRank if you successfully complete the challenges on its Jobs page . After which comes the interview stage. Usually, HackerRank interviews tend to focus largely on problem-solving skills.

Letâs go through 6 problem-solving HackerRank questions and answers that can help you perform better in interviews.

## Commonly Asked HackerRank Questions and Their Answers

HackerRank interviews have both technical and non-technical questions to evaluate a candidate. Since the people who cleared the coding challenges meet the criteria for technical knowledge, the interviewers majorly focus on other aspects â communication skills, mindset, ethics, etc.

## Technical Questions

The interviewer may ask you technical interview questions on topics similar to the ones mentioned below.

## 1.Â How do you build a palindrome?

One of the most common questions in HackerRank interviews is about building a palindrome. Unless you have a good understanding of strings and dynamic programming, you wonât be able to answer these questions. You need to store the palindromic substrings in a table and use them as building blocks for larger palindromes.

Interviewers love questions about palindromes because they test candidatesâ ability to write clean code along with their presence of mind.

## 2.Â How do you organise containers of balls?

HackerRank interviewers will often ask you about how to arrange coloured balls according to various situations.

The answer may depend on the specific situation, as various arrangements may be needed. However, some common structures may include arranging the balls in order of size, colour, alphabetically, or numerically. Additionally, for more complex arrangements, a sorting algorithm could be used to arrange the balls according to the desired criteria.

Questions regarding organising containers of balls test your understanding of 2D arrays, sorting and iteration. Focus on these areas to be comfortable with such questions in HackerRank interviews.

## 3.Â How do you solve a problem in the Subarray Division?

Problems on subarray division can be solved in a few lines of code using the âtwo-pointers techniqueâ. This technique works by having two pointers pointing to the arrayâs beginning and end respectively, and then looping through the array. Thus, making it a perfect question to test the depth of a candidateâs coding skills, ability to optimise, and basic mathematical skills.

Software developers benefit from knowing the two-pointers technique as it helps in efficiently solving array problems and more. Itâs also a common interview subject that comes up frequently. Preparing for problems on subarray division boosts your chances of cracking HackerRank interviews.

## Non-Technical Questions

Non-technical questions often reveal more about a candidateâs mindset and problem-solving process in the work environment than technical questions. Here are some non-technical HackerRank questions and answers to better prepare you for interviews:

## 4. How will you select a new tool to invest in?

Interviewers ask questions like this to evaluate how a candidate does their research about something. While there is no obvious correct answer to this question, your response should show that youâre good at researching a product or service.

The key factors you must keep in mind while answering this question (or similar questions) are:

- The problem youâre trying to solve with the tool
- The people behind the tool â how credible are they?
- Alternatives of the tool
- Cost of the tool
- Pros and cons of the tool

Ensure your answer reflects the way you research anything new.

## 5. How will you tackle a situation where a teammate is bound to miss a deadline?

There are high chances of you or your teammates missing a few deadlines, be it for avoidable or unavoidable circumstances. When an interviewer asks what youâll do in such situations, they are trying to figure out how you deal with crises and support your team members. Your answer should reflect empathy and a drive to solve challenges on short notice. Like most non-technical questions, the attitude behind the answer is more important than the contents of the answer.

## 6. Will you break the rules or guidelines for the larger benefit of the company?

Interviewers love questions that put candidates in a tough spot. Thatâs why interviewers often ask interviewees why the company should not hire them.

When asked whether youâd be willing to break any rule, be diplomatic in your answer. It is best to back your argument with logic and facts without being rigid on either perspective. Questions like these test a candidateâs character, morals, and ethics.

## General Tips for HackerRank Questions and Answers

For those of you who wish to go the extra mile, here are some general suggestions for acing your interview:

- Follow a framework like STAR (Situation, Task, Action, Result) or SOAR (Situation, Obstacle, Action, Results) to answer problem-solving questions
- Read the job description thoroughly and understand your job responsibilities
- Learn about the company â mission and values
- Work on your speaking skills, either with a friend or in front of a mirror/camera

## Get Ready for HackerRank Interviews With Codequotient

CodeQuotient âs offers practical resources for anyone who wants to bag a tech job. If youâre a learner or a job seeker, make sure to check out tips for interviews , information about different exams , and some coding tips and tricks .

## Get UGC Approved, BCA Degree And Earn While You Do That

Join CodeQuotient's Under-Graduate Program In Software Engineering

Get Paid Internship with Our Hiring Partners to Sponsor Your Fees

100% Placement Assistance

## You will also like:

- Critical Tips To Ace Cognizant Coding Questions
- CoCubes Login Guide: Eligibility, FAQs, and More
- TCS NQT 2023: Your Ticket to Hundreds of Placement Opportunities!
- Wipro Assessment Test 2023: Syllabus and Pattern
- 8 Top Node.js Questions to Help You Crack Coding Interviews

Your email address will not be published. Required fields are marked *

## Recent Posts

Are unpaid internships fair, necessary, or just exploitative, unlocking every student’s potential: cqst’s mission to help learners succeed, learning that breaks the mould: how codequotient is rethinking education.

- Strategy vs Execution: Finding the Right Balance
- Cracking the Coding Interview: A Guide to Mastering Technical Rounds
- Planning a Job After BCA? Explore These 7 Lucrative Career Options in 2024
- Why Your Fluency in English Shouldn’t Define Your Career Potential

## Subscribe to our newsletter

Get updates about the latest articles, industry news, eBooks & lots moreÂ from the world of Tech Recruitment Â straight to your inbox.

- CEO's Corner
- CodeQuotient School of Technology
- Engineering High-Performing Teams
- Software Engineering Bootcamp

## You May Also Like .

ÂŠď¸ 2023. All Rights Reserved.

About Â | Â Blog Â |Â Contact Â |Â Privacy Policy Â |Â Terms and Conditions

- All Platforms
- First Naukri
- All Companies
- Cognizant GenC
- Cognizant GenC Next
- Cognizant GenC Elevate
- Goldman Sachs
- Infosys SP and DSE
- TCS CodeVita
- TCS Digital
- TCS iON CCQT
- TCS Smart Hiring
- Tech Mahindra
- Zs Associates

- Top 100 Codes
- Learn Python
- Learn Data Structures
- Learn Competitve & Advanced Coding
- Learn Operating System
- Software Engineering
- Online Compiler
- Microsoft Coding Questions
- Amazon Coding Questions

- Learn Logical
- Learn Verbal
- Learn Data Interp.
- Psychometric Test

- All Syllabus
- Cognizant-Off Campus
- L&T Infotech
- Mahindra ComViva
- Reliance Jio
- Wells Fargo
- ZS-Associates

- Interview Preparation
- HR Interview
- Virtual Interview
- Technical Interview
- Group Discussions
- Leadership Questions

- All Interview Exp.
- Accenture ASE
- ZS Associates

- Get OffCampus updates
- On Instagram
- On LinkedIn
- On Telegram
- On Whatsapp
- AMCAT vs CoCubes vs eLitmus vs TCS iON CCQT
- Companies hiring via TCS iON CCQT
- Companies hiring via CoCubes
- Companies hiring via AMCAT
- Companies hiring via eLitmus
- Companies hiring from AMCAT, CoCubes, eLitmus
- Prime Video
- PrepInsta Prime
- Placement Stats

Notifications Mark All Read

No New notification

- Get Prime

## Top 25 Hackerrank Coding Questions and Answers

November 18, 2023

## Hackerrank Coding Questions for Practice

Below you can find the Top 25 Hackerrank based coding questions with solutions for the Hackerrank Coding test. in this article we have collected the most asked and most important Hackerrank coding questions that you need to prepare to successfully crack Hackerrank coding round for companies like IBM, Goldman Sachs, Cisco, Mountblu, Cognizant, etc.

Here you can practice all the Top 25 free !!! coding questions that were asked in the latest placement drives held by Hackerrank Hackerrank Coding questions are bit difficulty then the usual coding questions, as most of the product based companies hire through this platform.

## Sample Hackerrank Coding Questions

Details about hackerrank as a hiring platform.

Hackerrank Coding Questions are used by multiple organizations and MNC(s) for hiring coding proficient students, using Hackerrank Platform. For instance Hackerrank regularly hold coding competitions sponsored by specific companies as a resultÂ to hire engineers. However these contests vary in duration, rules, or challenge type/topic, depending on what the sponsor is looking to test for. After the contest, the sponsoring companies contact top performers on the leader-board about job opportunities.

## Shortcut keys (hotkeys)Â allowed are :

- alt/option + R : Run code
- alt/option + Enter : Submit code
- alt/option + F : Enable full screen
- Esc : Restore full screen

Use Coupon Code “ CT10 ” and get flat 10% OFF on your Prime Subscription plus one month extra on 12 months and above plans!!

## List of Hackerrank Practice Coding Questions

- Question 10
- Question 11
- Question 12
- Question 13
- Question 14
- Question 15
- Question 16
- Question 17
- Question 18
- Question 19
- Question 20
- Question 21
- Question 22
- Question 23
- Question 24
- Question 25

(Use Coupon Code CT10 and get 10% off plus extra month subscription)

## Prime Course Trailer

Related banners.

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

## Hackerrank Coding Questions with Solutions

Question 1 – maximum passengers.

Problem Statement -: A taxi can take multiple passengers to the railway station at the same time.On the way back to the starting point,the taxi driver may pick up additional passengers for his next trip to the airport.A map of passenger location has been created,represented as a square matrix.

The Matrix is filled with cells,and each cell will have an initial value as follows:

- A value greater than or equal to zero represents a path.
- A value equal to 1 represents a passenger.
- A value equal to -1 represents an obstruction.

The rules of motion of taxi are as follows:

- The Taxi driver starts at (0,0) and the railway station is at (n-1,n-1).Movement towards the railway station is right or down,through valid path cells.
- After reaching (n-1,n-1) the taxi driver travels back to (0,0) by travelling left or up through valid path cells.
- When passing through a path cell containing a passenger,the passenger is picked up.once the rider is picked up the cell becomes an empty path cell.Â
- If there is no valid path between (0,0) and (n-1,n-1),then no passenger can be picked.
- The goal is to collect as many passengers as possible so that the driver can maximize his earnings.

For example consider the following grid,

Â Â Â Â Â Â Â Â Â Â Â 0Â Â Â 1

Â Â Â Â Â Â Â Â Â Â -1 Â Â 0

Start at top left corner.Move right one collecting a passenger. Move down one to the destination.Cell (1,0) is blocked,So the return path is the reverse of the path to the airport.All Paths have been explored and one passenger is collected.

Int : maximum number of passengers that can be collected.

Sample Input 0

4Â -> size n = 4

4 -> size m = 4

0 0 0 1 -> mat

Explanation 0

The driver can contain a maximum of 2 passengers by taking the following path (0,0) â (0,1) â (0,2) â (0,3) â (1,3) â (2,3) â (3,3) â (3,2) â (3,1) â (3,0) â (2,0) â (1,0)Â â (0,0)

Sample Input 1

Â STD INÂ Â Â Â Â Â Â Â Â FunctionÂ

————Â Â Â Â Â Â Â ————-

Â Â Â 3 Â Â âÂ sizeÂ n=3

Â Â Â 3Â Â âÂ size m=3

Â Â Â 0 1 -1 â matÂ

Sample Output 1

Explanation 1

The driver can contain a maximum of 5 passengers by taking the following path (0,0) â (0,1) â (1,1) â (2,1) â (2,2) â (2,1) â (2,0) â (1,0) â (0,0)Â

## Question 2 – Minimum streets lights

Problem Statement -: Street Lights are installed at every position along a 1-D road of length n. Locations[] (an array) represents the coverage limit of these lights. The ith light has a coverage limit of locations[i] that can range from the position max((i – locations[i]), 1) to min((i + locations[i]), n ) (Closed intervals). Initially all the lights are switched off. Find the minimum number of fountains that must be switched on to cover the road.

locations[] = {0, 2, 13}then

For position 1: locations[1] = 0, max((1 – 0),

1) to mini (1+0), 3) gives range = 1 to 1

For position 2: locations[2] = 2, max((2-2),

1) to min( (2+2), 3) gives range = 1 to 3

For position 3: locations[3] = 1, max( (3-1),

1) to min( (3+1), 3) gives range = 2 to 3

For the entire length of this road to be covered, only the light at position 2 needs to be activated.

int : the minimum number of street lights that must be activated

Constraints :

- 1<_n<_ 10^5
- Â O<_locations[i] <_ mini (n,100) (where 1 <_1<_10^5)

Sample Input For Custom Testing :

3 ->locations[] size n = 3

1 ->locations[] [1, 1, 1]

1 ->Sample Output

Sample Output :

## Question 3 – Maximize Earnings

Problem Statement -:Â A company has a list of jobs to perform. Each job has a start time, end time and profit value. The manager has asked his employee Anirudh to pick jobs of his choice. Anirudh being greedy wants to select jobs for him in such a way that would maximize his earnings.Â

Given a list of jobs how many jobs and total earning are left for other employees once Anirudh

Picks jobs of his choice.

Note : Anirudh can perform only one job at a time.

Input format:

Each Job has 3 pieces of info – Start Time,End Time and Profit

The first line contains the number of Jobs for the day. Say ‘n’. So there will be ‘3n lines following as each job has 3 lines.

Each of the next ‘3n’ lines contains jobs in the following format:

start-time and end-time are in HHMM 24HRS format i.e. 9am is 0900 and 9PM is 2100

Constraints

- The number of jobs in the day is less than 10000 i.e. 0<_n<_10000
- Start-time is always less than end time.

Output format :-

Program should return an array of 2 integers where 1st one is number of jobs left and earnings of other employees.

Sample Input 1 :

Sample Output 1:

Sample Explanation 1

Anirudh chooses 1000-1200 jobs. His earnings is 500. The 1st and 3rd jobs i.e. 0900-1030 and 1100-1200 respectively overlap with the 2nd jobs. But profit earned from them will be 400 only. Hence Anirudh chooses 2nd one. Remaining 2 Jobs & 400 cash for other employees.

Sample Input 2:

Sample output 2:

Sample Explanation 2:

Anirudh can work on all appointments as there are none overlapping. Hence 0 appointments and 0 earnings for other employees.

## Question 4 : Network Stream

Problem Statement –Â A stream of n data packets arrives at a server. This server can only process packets that are exactly 2^n units long for some non-negative integer value of n (0<=n).

All packets are repackaged in order to the 1 largest possible value of 2^n units. The remaining portion of the packet is added to the next arriving packet before it is repackaged. Find the size of the largest repackaged packet in the given stream.

- arriving Packets = [12, 25, 10, 7, 8]
- The first packet has 12 units. The maximum value of 2^n that can be made has 2^n = 2^3 = 8 units because the next size up is 2^n = 2^4 = 16 (16 is greater than 12).
- 12 – 8 = 4 units are added to the next packet. There are 4 + 25 = 29 units to repackage, 2^n = 2^4 = 16 is the new size leaving 9 units (29-16 = 9) Next packet is 9 + 10 = 29 unists & the maximum units(in 2^n) is 16 leaving 3 units.
- 3 + 7 = 10 , the max units is 8 Leaving 2 units, and so on.
- The maximum repackaged size is 16 units.
- Long : the size of the largest packet that is streamed
- 1<=n<=10^5
- 1<=arriving Packets[i] size<=10^9

Sample case :

Sample input : 5 â number of packets=5 12 â size of packets=[13,25,12,2,8] 25 10 2 8 Sample output : 16

## Question 5 – Astronomy Lecture

Problem Statement -: Anirudh is attending an astronomy lecture. His professor who is very strict asks students to write a program to print the trapezium pattern using stars and dots as shown below . Since Anirudh is not good in astronomy can you help him?

Sample Input:

## Question 6 – Disk Space Analysis

Problem Statement -:Â You are given an array, You have to choose a contiguous subarray of length âkâ, and find the minimum of that segment, return the maximum of those minimums.

Sample input 0Â

1 âÂ Length of segment x =1

5 âÂ size of space n = 5

1 â space = [ 1,2,3,1,2]

Sample output

Explanation

The subarrays of size x = 1 are [1],[2],[3],[1], and [2],Because each subarray only contains 1 element, each value is minimal with respect to the subarray it is in. The maximum of these values is 3. Therefore, the answer is 3

## Question 7 : Guess the word

Problem Statement – Kochouseph Chittilappilly went to Dhruv Zplanet , a gaming space, with his friends and played a game called âGuess the Wordâ. Rules of games are –

- Computer displays some strings on the screen and the player should pick one string / word if this word matches with the random word that the computer picks then the player is declared as Winner.
- Kochouseph Chittilappillyâs friends played the game and no one won the game. This is Kochouseph Chittilappillyâs turn to play and he decided to must win the game.
- What he observed from his friend’s game is that the computer is picking up the string whose length is odd and also that should be maximum. Due to system failure computers sometimes cannot generate odd length words. In such cases you will lose the game anyways and it displays âbetter luck next timeâ. He needs your help. Check below cases for better understand

Sample input : 5 â number of strings Hello Good morning Welcome you Sample output : morning

Explanation:

- Morning â 7
- Welcome â 7

First word that is picked by computer is morning

Sample input 2 : 3 Go to hell

Sample output 2: Better luck next time

Explanation: Here no word with odd length so computer confuses and gives better luck next time

## Question 8 – Minimum Start value

Problem Statement -:Â Raman was playing a game, in starting he has x coins at some point of the game he has to pay some coins to get into the next level of the game, during each game he can collect some coins. If at anypoint of theÂ game numbers of coins of Raman is less than one he will lose the game. Find the minimum value of x such that Raman wins.

## Question 9 : Complex Math

Problem Statement – The math assignment says you will be given numbers, mostly with imaginary additions, that means complex numbers, and you need to add them and tell the answer in your answer script. You told your friend John that you don’t know the addition of complex numbers, so John will write a program, which you can write in order to get the results of addition.

John knows Object oriented programming enough to complete the task.

Input Format: Three integers a b and c Output format: First print the complex number a+bi Next line print a + bi + c as i2. Next line i2+a+bi

Sample Input: 4 5 2

Sample Output: 4 + 5i 6 + 5i 10 + 10i

## Question 10 : Minimum Occurrence

Problem Statement – Given a sting , return the character that appears the minimum number of times in the string. The string will contain only ascii characters, from the ranges (âaâ-âzâ,âAâ-âZâ,0-9), and case matters . If there is a tie in the minimum number of times a character appears in the string return the character that appears first in the string.

Input Format: Single line with no space denoting the input string.

OutputFormat: Single character denoting the least frequent character.

Constraints: Length of string <=10^6

Sample Input: cdadcda

Sample Output: c

Explanation: C and A both are with minimum frequency. So c is the answer because it comes first with less index.

## Question 11 : Devil Groups

Problem Statement –

There are some groups of devils and they splitted into people to kill them. Devils make People to them left as their group and at last the group with maximum length will be killed. Two types of devils are there namely â@â and â$â People is represented as a string âPâ

Input Format: First line with the string for input

Output Format: Number of groups that can be formed.

Constraints: 2<=Length of string<=10^9

Input string PPPPPP@PPP@PP$PP

Explanation 4 groups can be formed

Most people in the group lie in group 1 with 7 members.

## Question 12 : Vampire Battle

Problem Statement – Stephan is a vampire. And he is fighting with his brother Damon. Vampires get energy from human bloods, so they need to feed on human blood, killing the human beings. Stephan is also less inhuman, so he will like to take less life in his hand. Now all the people’s blood has some power, which increases the powers of the Vampire. Stephan just needs to be more powerful than Damon, killing the least human possible. Tell the total power Steohan will have after drinking the bloods before the battle.

- Note that: Damon is a beast, so no human being will be left after Damon drinks everyone’s blood. But Stephan always comes early in the town.

Input Format:

First line with the number of people in the town, n.

Second line with a string with n characters, denoting the one digit power in every blood.

Output Format:

Total minimum power Stephan will gather before the battle.

Constraints:

Sample input :

Sample output :

Stephan riches the town, drinks the blood with power 9. Now Damon cannot reach 9 by drinking all the other bloods.

## Question 13 : Copycat in exam

Problem Statement –Â Rahul copies in the exam from his adjacent students. But he doesn’t want to be caught, so he changes words keeping the letter constant. That means he interchanges the positions of letters in words. You are the examiner and you have to find if he has copied a certain word from the one adjacent student who is giving the same exam, and give Rahul the markings he deserves.

Note that: Uppercase and lowercase are theÂ same.

- First line with the adjacent student’s word
- Second line with Rahul’s word
- 0 if not copied
- 1 if copied
- 1<=Length of string<=10^6

Sample Output:

## Question 14 : Mr. Robotâs Password

Problem Statement –Â Mr. Robot is making a website, in which there is a tab to create a password. As other websites, there are rules so that the password gets complex and none can predict the password for another. So he gave some rules like:

- At least one numeric digit
- At Least one Small/Lowercase Letter
- At Least one Capital/Uppercase Letter
- Must not have spaceÂ
- Must not have slash (/)
- At least 6 characters
- If someone inputs an invalid password, the code prints: “Invalid password, try again”.

Otherwise, it prints: “password valid”.

A line with a given string as a password

- Otherwise, it prints: “password valid”, without the quotation marks.
- Number of character in the given string <=10^9

Sample input 1:Â

Sample output 1:Â

password valid

Sample input 2:Â

Sample output 2:Â

Invalid password, try again

## Question 15 : Weird Terminal

Problem Statement –Â Here is a weird problem in Susan’s terminal. He can not write more than two words each line, if she writes more than two, it takes only 2 words and the rest are not taken. So she needs to use enter and put the rest in a new line. For a given paragraph, how many lines are needed to be written in Susan’s terminal?

- A string as the text to input in the terminal
- Number of lines written.
- Number of words <=10^7

How long do you have to sit dear ?

The writing will be:

## Question 16 : Set Bit calculatorÂ

Problem Statement – Angela plays with the different bits. She was given a bunch of numbers and she needs to find how many set bits are there in total. Help Angela to impress her, write a code to do so.

- First line with n, an integer
- Next n lines denoting n integers angela is given.
- Total number of set bits
- Number of elements or number <=10^7
- numbers<=10000

Sample Input: 4 1 3 2 1

Sample Output: 5

## Question 17 : Duplicates

Problem Statement – The principal has a problem with repetitions. Everytime someone sends the same email twice he becomes angry and starts yelling. His personal assistant filters the mails so that all the unique mails are sent only once, and if there is someone sending the same mail again and again, he deletes them. Write a program which will see the list of roll numbers of the student and find how many emails are to be deleted.

Sample Input: 6 1 3 3 4 3 3

Sample Output: 3

## Question 18 : Device Name System

Problem Statement –Â Rocky is a software engineer and he is creating his own operating system called “myFirst os”. myFirst osÂ is a GUI (Graphical user interface) based operating system where everything is stored in files and folders. He is facing issues onÂ creating unique folder names for the operating system . Help rocky to create the unique folder name for it’s os.If folder name already exists in the system and integer number is added at the name to make it unique. The integer added starts with 1 and is incremented by 1 for each new request of an existing folder name. Given a list of folder names , process all requests and return an array of corresponding folder names.

- foldername= [‘home’ , ‘myfirst’ ,’downloads’, ‘myfirst’, ‘myfirst’]
- foldername[0]= ‘home’ is unique.
- foldername[1]= ‘myfirst’ is unique.
- foldername [2]=’downloads’ is unique.
- foldername[3]=’myfirst’ already exists in our system. So Add1 at the end of the folder name i.e foldername[3]=”myfirst1″
- foldername[4]=’myfirst’ also already exists in our system.So add 2 at the end of the folder name i.e. foldername[4]=”myfirst2″.

folderNameSystem function has the following parameters

- Â Â Â string foldername[n]: an array of folder name string in the order requested
- String[n]:Â an array of strings usernames in the order assigned
- Â Â Â Â 1<=n<=10^4
- Â Â Â Â 1<=length of foldername[i]<20
- Â Â Â Â foldername[i] contains only lowercase english letter in the range ascii[a-z]
- The first line contains an integer n , denoting the size of the array usernames
- Each line i of the n subsequent lines (where i<=0<=n) contains a string usernames[i] representing a username request in the order received.

Explanation :

- Â Â Â foldername[0] = ‘home’ is unique
- Â Â Â foldername[1]=’download’ is unique
- Â Â Â foldername[2]= ‘first’ is unique
- Â Â Â foldername[3]=’first’ is already existing . so add 1 to it and it become first1

## Question 19 : Formatting large Products

Problem Statement – Rohan is weak in mathematics.He is giving mathematicsÂ Olympiad , but he got stuck in one of the question. Help rohan to solve the question.In Question there are two positive integer A and B. You have to find the product of all integer between A and B which is represented in the form C=D*10^E , whereÂ C is the product of numbers , D and E are non-negative integers and the last digit of D is non-zero.

Function DescriptionÂ

Complete the function formatProducts in the editor below, formatProduct must return a string that represents C in the above described form.

Function has the following parameters

- A: an integer
- B: an integer
- Â Â Â A will between 1 and 1,000,000 . Inclusive.
- Â Â Â B will be between A and 1,000,000. Inclusive.

Sample Input : Â

1*2*3*4*5=120 = 12 * 10^1

Â Sample Input :

18144 * 10^2

3*4*….*10=1814400 =18144 * 10^2

## Question 20 : Maximum Toys

Problem Statement – In a toy shop there are a number of toys presented with several various – priced toys in a specific order. You have a limited budget and would like to select the greatest number of consecutive toys that fit within the budget. Given prices of the toys and your budget, what is the maximum number of toys that can be purchased for your child?

- prices=[1,4,5,3,2,1,6]

All subarrays that sum to less than or equal to 6 .

- length 1: [1] [4] [5] [3] [2] [1] [6]
- length 2: [1,4] [3,2] [2,1]
- length 3: [3,2,1]

The longest of these or the maximum number of toys that can be purchased is 3.

Function description Complete the function

- getMaxToys in the editor below
- getMaxToys has the following parameters: int prices[n] : the prices of the various toys.
- int money: the amount of money you can spend on toys

Returns : Int the maximum number of toys you can purchase

- 1<=price[i]<=100
- 1<=money<=10^6

Sample case

Sample input : 7 1 4 5 3 2 1 6 6Â

## Question 21 : Maximum Attendance

Problem Statement – A teacher wants to look at students’ attendance data. Given that there is a class , and the teacher has the record of the students present on n days of the month, find the maximum number of consecutive days on which all students were present in the class.

data=[PPPP, PPPP ,PPPP ,PPAP ,AAPP ,PAPA ,AAAA]

There are 4 students and 7 days attendance data . There are only three days, at the beginning where all students are present. Student 3 is absent on the fourth day , and students 1 and 2 are absent on the fifth day , and students 2 and 4 are absent on the sixth day and all are absent on the last day.

The maximum number of consecutive days on which all the students were present in the class is 3 days long.

Function Description :

Complete the maxConsecutive function in the editor below. The function must return an integer denoting the maximum number of consecutive days where all the students are present in the class.

- int m : the number of students in the class.
- string data[n] : the value of each element data[i] is a
- string where data[i] denotes ith student is present on the ith day.
- 1<=m<=10
- 1<=n<=31
- Each data[i][j]={‘P’,’A’}

Input Format :

Sample Output: 1

Explanation : There is only one day in which all the students are present.

## Question 22 : Solve equations

Solve the given equations: You will be given an array, and T number of equations. Solve that equation and update the array for every equation you solve Input Example: 2 3 4 5 1 â input array 3 â number of equations x*x x+x 3*x+x

Output: 32 72 128 200 8 Explanation :

- For first case array becomes arr=[ 4 9 16 25 1]
- For second case array becomes arr=[8 18 32 50 2]
- For third case array becomes arr=[32 72 128 200 8]

Output will be : 32 72 128 200 8

## Question 23 : Solve equations

Solve the given equations:Â There are consecutive lighthouses present in the x axis of a plane.You are given n, which represents the the number of light position and x coordinate array which represent the position of the lighthouses.You have to find maximum lighthouses which have absolute difference less than or equal to 1 between adjacent numbers.

## Question 24: Match

Solve the given equations:Â The number of matches won by two teams in matches in leagues is given in the form of two lists. For each league score of team B. Compute the total number of matches of team A where team A has won less than or equal to the number of wins scored by team B in that match.

## Question 25: jumble the words

Solve the given equations:

Confuse your friends by jumbling the two words given to you. To don’t get yourself into confusion follow a pattern to jumble the letters. Pattern to be followed is , pick a character from the first word and pick another character from the second word. Continue this process

Take two strings as input , create a new string by picking a letter from string1 and then from string2, repeat this until both strings are finished and maintain the subsequence. If one of the strings is exhausted before the other, append the remaining letters from the other string all at once.

## Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

## Checkout list of all the video courses in PrepInsta Prime Subscription

Login/Signup to comment

Ensure that you are logged in and have the required permissions to access the test.

A server error has occurred. Please refresh the page or try after some time.

An error has occurred. Please refresh the page or try after some time.

Signup and get free access to 100+ Tutorials and Practice Problems Start Now

## Linear Search

- Binary Search
- Ternary Search
- Bubble Sort
- Selection Sort
- Insertion Sort
- Counting Sort
- Bucket Sort
- Basics of Greedy Algorithms
- Graph Representation
- Breadth First Search
- Depth First Search
- Minimum Spanning Tree
- Shortest Path Algorithms
- Flood-fill Algorithm
- Articulation Points and Bridges
- Biconnected Components
- Strongly Connected Components
- Topological Sort
- Hamiltonian Path
- Maximum flow
- Minimum Cost Maximum Flow
- Basics of String Manipulation
- String Searching
- Z Algorithm
- Manacharâs Algorithm
- Introduction to Dynamic Programming 1
- 2 Dimensional
- State space reduction
- Dynamic Programming and Bit Masking

## Solve Problems

ATTEMPTED BY: 1196 SUCCESS RATE: 67% LEVEL: Easy

- Participate

## Equal Strings

ATTEMPTED BY: 584 SUCCESS RATE: 55% LEVEL: Medium

## AND Subsequence

ATTEMPTED BY: 414 SUCCESS RATE: 41% LEVEL: Medium

## Adjacent Sum Greater than K

ATTEMPTED BY: 803 SUCCESS RATE: 68% LEVEL: Medium

## Equal Diverse Teams

ATTEMPTED BY: 1225 SUCCESS RATE: 28% LEVEL: Easy

## Permutation Swaps

ATTEMPTED BY: 917 SUCCESS RATE: 34% LEVEL: Easy

## Guess Permutation

ATTEMPTED BY: 520 SUCCESS RATE: 70% LEVEL: Hard

ATTEMPTED BY: 410 SUCCESS RATE: 75% LEVEL: Medium

## Equal Parity Sum

ATTEMPTED BY: 613 SUCCESS RATE: 58% LEVEL: Medium

## Employee rating

ATTEMPTED BY: 2200 SUCCESS RATE: 85% LEVEL: Easy

- An alphabet
- A special character
- Minimum 8 characters

A password reset link will be sent to the following email id

## Search code, repositories, users, issues, pull requests...

Provide feedback.

We read every piece of feedback, and take your input very seriously.

## Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

- Notifications

Solutions to Certification of Problem Solving Basic on Hackerrank

## reebaseb/Hackerrank_ProblemSolvingBasic_Certificate_test-soltions

Folders and files, repository files navigation, hackerrank problem solving(basic) certificate test soltions.

To get a certificate, two problems have to be solved within 90 minutes.

The following is a list of possible problems per certificate.

- Active Traders
- Balanced System Files Partition
- Longest Subarray
- Maximum Cost of Laptop Count
- Nearly Similar Rectangles
- Parallel Processing
- Password Decryption
- Road Repair
- String Anagram
- Subarray Sums
- Unexpected Demand
- Usernames Changes
- Vowel Substring
- Python 100.0%

## IMAGES

## VIDEO

## COMMENTS

Get Certificate Solving problems is the core of computer science. Programmers must first understand how a human solves a problem, then understand how to translate this "algorithm" into something a computer can do, and finally, how to write the specific code to implement the solution.

Problem Solving (Basic) Skills Certification Test Verify your Problem Solving Skills. Accelerate your Job Search. Take the HackerRank Certification Test and showcase your knowledge as a HackerRank verified developer. Take the HackerRank Skills Test Skill over pedigree Prove your Skills

Explanation For the first example, you can solve the problems with rating 5 and 7 on the first day and the problem with rating 4 on the next day. Note that the problems with rating 5 and 4 cannot be completed consecutively because the ratings should differ by at least K (which is 2).

Problem Solving (Basic) Get Certified Python (Basic) Get Certified Stand out from the crowd Take the HackerRank Certification Test and make your profile stand out View all certifications Prepare By Topics Algorithms Data Structures Mathematics Artificial Intelligence C C++ Java Python Ruby SQL Databases Linux Shell Functional Programming Regex

Prepare Python Python Say "Hello, World!" With Python EasyMax Score: 5Success Rate: 96.29% Solve Challenge Python If-Else EasyPython (Basic)Max Score: 10Success Rate: 89.77% Solve Challenge Arithmetic Operators EasyPython (Basic)Max Score: 10Success Rate: 97.45% Solve Challenge Python: Division EasyPython (Basic)Max Score: 10Success Rate: 98.68%

A collection of solutions to competitive programming exercises on HackerRank. competitive-programming hackerrank hackerrank-solutions hackerrank-certificates hackerrank-certification Updated on Jun 3, 2023 Python Psingh12354 / HackerRank-Certification Star 88 Code Issues Pull requests HackerRank Certification Question

Basic Problem Solving Test Jun 17 2023, 08:30 pm PST to Jun 24 2023, 08:30 pm PST Rules The creator of this contest is solely responsible for setting and communicating the eligibility requirements associated with prizes awarded to participants, as well as for procurement and distribution of all prizes.

Road Repair Balanced System File Partition Problem Contains solved programs for the HackerRank Problem Solving (Basics) Skill Test Certification đ. - GitHub - anishLearnsToCode/hackerrank-problem-solving-skill-test: Contains solved programs for the HackerRank Problem Solving (Basics) Skill Test Certification đ.

Prepare Java Java Welcome to Java! EasyMax Score: 3Success Rate: 97.06% Solve Challenge Java Stdin and Stdout I EasyJava (Basic)Max Score: 5Success Rate: 96.93% Solve Challenge Java If-Else EasyJava (Basic)Max Score: 10Success Rate: 91.30% Solve Challenge Java Stdin and Stdout II EasyJava (Basic)Max Score: 10Success Rate: 92.58% Solve Challenge

âď¸ Content Description âď¸In this video, I have explained the overview of hackerrank website and additional course details to improve coding skills.Daliy codi...

all hackerrank solutions playlist contains efficient solutions for all hackerrank problem solving challenges in java including- hackerrank algorithm solution...

Certificates To get a certificate, two problems have to be solved within 90 minutes. The following is an incomplete list of possible problems per certificate as of 2021.09.15. Please let me know if the certificate problems have changed, so I can put a note here. Problem Solving (Basic) Active Traders Balanced System Files Partition Longest Subarray

This repository consists of solutions to HackerRank practice, tutorials, and interview preparation problems with Python, mySQL, C#, and JavaScript. Personal HackerRank Profile View Profile HackerRank Badges HackerRank Certificates Table Of Contents Practices Completed Tutorials Completed Interview Preparation Kit Certificates Practices Completed

Tip #1: Start Easy, and Gently Work Your Way Up L ike most other competitive programming platforms, HackerRank groups challenges into different difficulty levels. When you first start, the best way is to use the filters on the right side, start from the ' Easy ' ones, then gradually work your way down the difficulty chain. Photo by author

In this video I will tell How To Solve Questions On Hackerrank or How To Solve Problems On Hackerrank . This video is for beginners who is starting their jou...

Hackerrank Problem solving solutions in Python python python-3-6 python3 hackerrank problem-solving python2 hacktoberfest hackerrank-python hackerrank-datastructures-array hackerrank-solutions hackerrank-algorithms-solutions hackerrank-challenges hackerrank-problem-solutions hackerrank-problem-solving hacktoberfest2020 Updated on Oct 20, 2023

Usually, HackerRank interviews tend to focus largely on problem-solving skills. Let's go through 6 problem-solving HackerRank questions and answers that can help you perform better in interviews. Commonly Asked HackerRank Questions and Their Answers. HackerRank interviews have both technical and non-technical questions to evaluate a candidate.

Below you can find the Top 25 Hackerrank based coding questions with solutions for the Hackerrank Coding test. in this article we have collected the most asked and most important Hackerrank coding questions that you need to prepare to successfully crack Hackerrank coding round for companies like IBM, Goldman Sachs, Cisco, Mountblu, Cognizant, etc.

0:00 / 7:37 HackerRank Problem Solving (Basic) Solutions [4 Questions Solved] With Certificate | #Hackerrank TechNinjas 2.0 3.92K subscribers Subscribe Subscribed 245 48K views 3 years ago đ...

âď¸ Content Description âď¸In this video, I have explained about the necessary information about the problem before solving and how to solve a problem efficien...

Hackerrank Problem solving solutions in Python python python-3-6 python3 hackerrank problem-solving python2 hacktoberfest hackerrank-python hackerrank-datastructures-array hackerrank-solutions hackerrank-algorithms-solutions hackerrank-challenges hackerrank-problem-solutions hackerrank-problem-solving hacktoberfest2020 Updated on Oct 20, 2023

Employee rating. ATTEMPTED BY: 2193 SUCCESS RATE: 85% LEVEL: Easy. SOLVE NOW. 1 2 3. Solve practice problems for Linear Search to test your programming skills. Also go through detailed tutorials to improve your understanding to the topic. | page 1.

Code README Hackerrank Problem Solving (Basic) Certificate test soltions Solutions to Certification of Problem Solving Basic on Hackerrank To get a certificate, two problems have to be solved within 90 minutes. The following is a list of possible problems per certificate. Problem Solving (Basic) Active Traders Balanced System Files Partition

14 likes, 0 comments - datascience_mind on February 21, 2024: "Let's embark on our rocket journey of preparation in just 2 days! ď¸ Day 1: Mastering t..."