JusPay Coding Questions and Answers

Coding Questions for Juspay

JusPay Coding Questions are available on this page. As Juspay is a dream company to many, it is important to understand the basic pattern and Juspay Coding Questions and Sample Mock Paper and Solutions Answers for 2024 batch. This page is based on the same and is stuffed with well-researched data. Go through the page to understand the pattern in more detail.

JusPay coding

About JusPay Coding Questions Exam Pattern

If you are interested in JusPay recruitment then we have updated the latest patter here.. Go through the table for some information regarding the paper in Juspay recruitment.

Section NameTotal QuestionsTime Limit
Aptitude30 Questions30 mins
Online Coding3 Questions90 mins
Total33 Questions120 mins

Juspay Eligibility Criteria 2024

The eligibility criteria for Juspay is given below in the tabulated format.
HCLRequirements
QualificationB.Tech
Eligible YOP

Student pursuing their pre final or final year

Percentage CriteriaMinimum 70% in class X and XII
BacklogNo Active Backlog

Juspay Aptitude Syllabus 2024

Detailed Information about Juspay Written Round Sections:-

Juspay Numerical Ability

  • HCF and LCM
  • Number System
  • Time and Work, Pipes and Cisterns
  • Permutation and Combination

Click on the button below to know more….

Additional Information:-

  • Total Questions ~ 10
  • Time Allotted ~ 10 mins

Prime Course Trailer

Related Banners

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

Juspay Verbal English Syllabus 2024

Detailed Information about Juspay Written Round Sections:-

Juspay Verbal Ability

  • Sentence Correction
  • Preposition
  • Grammar

Click on the button below to know more….

Additional Information:-

  • Total Questions ~ 10
  • Time Allotted ~ 10 mins

Juspay Reasoning Syllabus 2024

Detailed Information about Juspay Written Round Sections:-

Juspay Logical Reasoning

  • Analogies
  • Direction
  • Blood Relations
  • Critical Reasoning

Click on the button below to know more….

Additional Information:-

  • Total Questions ~ 10
  • Time Allotted ~ 10 mins

Juspay Coding Syllabus 2024

Detailed Information about Juspay Coding Round Sections:-

Juspay Coding Syllabus

  • C
  • C++
  • Java
  • Data Structure

Click on the button below to know more….

Additional Information:-

  • Total Questions ~ 2
  • Time Allotted ~ 60 mins

Practice Juspay Previous Year Coding Questions

Question 1: Stars Between Bars

Given a string s consisting of stars “*” and bars  “|” ,an array of starting indices starIndex, and an array of ending indices endIndex, determine the number of stars between any two bars within the substrings between the two indices inclusive . NOTE that in this problem indexing starts at 0.

  • A Star is represented as an asterisk [*=ascii decimal 42]
  • A Bar is represented as a Pipe [“|”=ascii decimal 124]

Example

s=’|**|*|’
n = 2
startIndex=[0,0]
endIndex=[4,5]

  • For the first pair of indices (0,4) the substrings is “|**|*”  . There are 2 stars between a pair of bars
  • For the second pair of indices (0,5) the substring is  “|**|*|” and there are 2+1=3 stars in between the bars.
  • Both of the answers are returned to the array [2,3].

Constraints

  • 1 <= n <= 105
  • 1 <= StartIndex[i] <= endIndex[i]
  • Each Character of s is either “*” or “|”

Input Format for Custom testing

First line contains a string S. The next line contains an integer n , the no.of elements in startIndex and endIndex. Each line i of the n subsequent lines contains an integer of startIndex. Each line i of the n subsequent lines contains an integer of endindex.

Sample Input

*|*|  → s=”*|*|”
1 → size of startindex[] and endIndex[] is 1.
0 → startindex = 0
2 → endindex = 2

Sample output:

0

Explanation :

The substring from index = 0 to index = 2 is “*|*” . there is no consecutive pair of bars in this string.

Question 2: Vampire Battle

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 Stephan will have after drinking the bloods before the battle.

Note : 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:

  • 1 <= n <= 10^4

Sample input:

  • 6   
  • 093212

Sample output

  • 9

Explanation:

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

Question 3 : Duplicates

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.

Input Format:

  • First line takes n, which is the total no. of mails recieved.
  • Second line takes the n no. of email id as input./li>

Output Format:

Total no. of duplicate email id’s to be deleted.

Constraints:

  • 1 <= n <= 10^4

Sample input:

  • 6   
  • 1 3 3 4 3 3

Sample output

  • 3

Question 4 : Last student’s ID

There is an id code that is supposed to be given to all the aspirants of an exam. It is actually a substring of a given string. That means, the authority takes a string and then assigns all the unique substrings to all the students. Suppose there is a string “abcde”, so the ids of the students will be “a”, “ab”, ”abc”, ”abcd”, ”abcde”, ”b”, ”bc”, ”bcd”, ”bcde”, ”c”, ”cd”, ”cde”, ”d”, ”de”, ”e”.
The students are standing in a line according to the lexicographic order of their given ids. You have to find out the id of the last student for the given input string from which the ids are generated and then arranged in lexicographic order.

Input Format:

  • Single line with the id generating string

Output format:

  • The last id as per lexicographical order.

Constraints:

  • Number of characters in the string<=10^9

Sample Input:

abdc

Sample output:

dc

Explanation:

The last student as per lexicographical order will be with the id dc. The lexicographical order for adbc will be :
a
ab
abd
abdc
b
bd
bdc
c
d
dc

Question 5 : Coin Game

Raman was playing a game,  he starts with x coins. Now in every step, he wins and loses and he has to get the money or pay the money as needed. He came in contact with a psychic who can see the future and the Psychic predicted the outcomes after each step. Now Raman wants to start the game with the minimum wage where he doesn’t run out of money.  Help Raman to find what money he should start with. The only rule to keep playing is not going in a credit situation.

Input Format:

  • First line with n, number of steps in the game
  • Next n lines, n integers denoting outcomes of every game. Positive means winning and negative means losing that money.

Output Format:

  • One single integer denoting the minimum amount to start with

Constraints:

  • Number of steps<=10^9
  • -1000<=Money needed in each step<=1000

Sample Input:

    4
    2
    -9
    15
     2

Sample Output:

    7

Explanation:

If he starts with 7 rupees, then after steps : 7 ->9 -> 0-> 15 -> 17.

Overall Analytics For Juspay

Juspay Question

Total Questions

33

Clock Juspay

Total Time

120 Mins

Adobe Pattern

Pattern

Non-Adaptive

Juspay coding level

Difficulty Level

Moderate to High

FAQs on Juspay Coding Questions with Solutions

Question 1: How many questions are asked in the Juspay recruitment exam?

Juspay recruitment exam has in total 33 questions asked in 120 minutes. This includes questions on aptitude and coding.

Question 2: How many coding questions are asked in the Juspay recruitment exam?

Three coding questions are asked in the Juspay recruitment exam.

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

One comment on “JusPay Coding Questions and Answers”


  • ROUTHU

    #include
    #include

    typedef struct {
    int x;
    int y;
    } Point;

    double distance(Point p1, Point p2) {
    return sqrt(pow(p2.x – p1.x, 2) + pow(p2.y – p1.y, 2));
    }

    int main() {
    Point userLocation;
    printf(“Enter your current location (x y): “);
    scanf(“%d %d”, &userLocation.x, &userLocation.y);

    // Define your array of meeting cell locations here
    Point meetingCells[] = { /* Add meeting cell locations */ };

    int numMeetingCells = sizeof(meetingCells) / sizeof(meetingCells[0]);
    double minDistance = -1;
    Point nearestCell;

    for (int i = 0; i < numMeetingCells; i++) {
    double d = distance(userLocation, meetingCells[i]);
    if (minDistance == -1 || d < minDistance) {
    minDistance = d;
    nearestCell = meetingCells[i];
    }
    }

    printf("Nearest meeting cell is at (%d, %d)\n", nearestCell.x, nearestCell.y);
    return 0;
    }