BashaByte
Problem library

Problems

112 curated problems, from first loops to two pointers. Every submission is judged on hidden test cases.

Track your progress and streaks

Log in to save solved problems, build a daily practice streak and climb the leaderboard.

1 Even or Odd Easy 90.9% 2 Voting Eligibility Check Easy 100% 3 Check Leap year Easy 100% 4 Electricity Bill Calculator Easy 100% 5 Print Multiplication Table Easy 100% 6 Multiplication Table Using For-Else Medium New 7 Sum of First N Natural Numbers Easy New 8 Sum of Digits in a Number Easy New 9 Reverse a Number Easy New 10 Palindrome Number Checker Easy New 11 Prime Number Checker Easy New 12 Generate Prime Numbers Up to N Easy New 15 Namaste, Coder! BasicsInput/Output Easy New 16 Chai and Samosa Bill BasicsMath Easy New 17 Cricket Ground Fencing BasicsMath Easy New 18 Movie Duration BasicsMath Easy New 19 Weather Report: Celsius to Fahrenheit BasicsMath Easy New 20 Simple Interest Calculator BasicsMath Easy New 21 Swap the Seats BasicsVariables Easy 100% 22 Last Digit of the Bus Number BasicsMath Easy 100% 23 Sharing Laddoos BasicsMath Easy New 24 Average of Three Marks BasicsMath Easy New 25 Train Journey Timer BasicsFormatting +1 Easy New 26 ATM Note Counter BasicsGreedy +1 Easy New 27 Bank Balance Status Conditionals Easy New 28 Tallest of Three Friends Conditionals Easy New 29 Exam Grade Calculator Conditionals Easy New 30 Triangle Type Checker ConditionalsMath Easy New 31 Vowel or Consonant ConditionalsStrings Easy New 32 Movie Ticket Price Conditionals Easy New 33 Clap Game (FizzBuzz) ConditionalsMath Easy New 34 Which Quadrant? ConditionalsMath Easy New 35 Festival Sale Discount ConditionalsMath Easy New 36 Day of the Week Conditionals Easy New 37 Profit or Loss ConditionalsMath Easy New 38 What Kind of Character? ConditionalsStrings Easy New 39 Rocket Launch Countdown Loops Easy New 40 Even Numbers Till N Loops Easy New 41 Factorial of N LoopsMath Easy New 42 Count the Digits LoopsMath Easy New 43 Power Calculator LoopsMath Easy New 44 Even Sum and Odd Sum LoopsMath Easy New 45 Fibonacci Series LoopsMath Easy New 46 Biggest Square Tile (GCD) GCDLoops +1 Easy New 47 When Will the Buses Meet? (LCM) GCDLoops +1 Easy New 48 Armstrong Number LoopsMath Easy 100% 49 Perfect Number LoopsMath Easy New 50 All Factors of a Number LoopsMath Easy New 51 Digital Root LoopsMath Easy New 52 The 3n + 1 Game LoopsMath Easy New 53 Binary to Decimal LoopsMath +1 Easy New 54 Decimal to Binary LoopsMath +1 Easy New 55 Star Staircase Nested LoopsPatterns Easy New 56 Melting Ice Candy Nested LoopsPatterns Easy New 57 Number Staircase Nested LoopsPatterns Easy New 58 Floyd's Triangle Nested LoopsPatterns Easy New 59 Star Pyramid Nested LoopsPatterns Easy New 60 Hollow Square Photo Frame ConditionalsNested Loops +1 Easy New 61 Alphabet Staircase Nested LoopsPatterns +1 Easy New 62 Diamond Pattern Nested LoopsPatterns Easy New 63 Total Runs in an Innings Arrays Easy New 64 Hottest and Coldest Day Arrays Easy New 65 Count Even and Odd Arrays Easy New 66 Reverse the Queue ArraysTwo Pointers Easy New 67 Find the Roll Number ArraysSearching Easy New 68 Second Highest Score Arrays Easy New 69 Is the Line Sorted? Arrays Easy New 70 Count the Votes Arrays Easy New 71 Running Total of Savings ArraysPrefix Sum Easy New 72 Rotate the Playlist Arrays Easy New 73 Move the Zeros to the End ArraysTwo Pointers Easy New 74 Remove Duplicate Entries ArraysTwo Pointers Easy New 75 The Missing Roll Number ArraysMath Easy New 76 Two Items, Exact Budget (Two Sum) ArraysHashing Medium New 77 Longest Attendance Streak Arrays Easy New 78 Leaders in the Line Arrays Easy New 79 Merge Two Sorted Lists ArraysSorting +1 Easy New 80 Best Day to Buy and Sell Gold ArraysGreedy Easy New 81 Best Run of Days (Maximum Subarray Sum) ArraysKadane's Algorithm Medium New 82 How Many Times Each? (Frequency Count) ArraysHashing Easy New 83 Common Friends ArraysHashing +1 Easy New 84 Kids With the Most Chocolates Arrays Easy New 85 Count the Vowels Strings Easy New 86 Secret Mirror Message StringsTwo Pointers Easy New 87 Palindrome Word StringsTwo Pointers Easy New 88 Word Counter Strings Easy New 89 Caps Lock Accident Strings Easy New 90 Newspaper Headline Strings Easy New 91 Letter Frequency HashingStrings Easy New 92 First Unique Character HashingStrings Medium New 93 Are They Anagrams? HashingSorting +1 Easy New 94 SMS Shortcut (Remove Vowels) Strings Easy New 95 Longest Word in the Sentence Strings Easy New 96 String Compression StringsTwo Pointers Easy New 97 Caesar's Secret Code MathStrings Easy New 98 Reverse the Words StringsTwo Pointers Easy New 99 Pangram Checker HashingStrings Easy New 100 Password Strength Checker ConditionalsStrings Easy New 101 Valid Brackets StackStrings Medium New 102 Longest Common Prefix Strings Easy New 103 Class Monitor Election (Majority Vote) ArraysHashing Easy New 104 Report Card Totals ArraysMatrix Easy New 105 Rotate the Seating Chart (Transpose) Matrix Easy New 106 Diagonal Sum of a Square Board Matrix Easy New 107 Add Two Sales Tables Matrix Easy New 108 Find the Duplicate Token ArraysHashing Medium New 109 Dictionary Search (Binary Search) ArraysBinary Search +1 Medium New 110 Count Friend Pairs With Target Sum ArraysHashing Medium New 111 Happy Number HashingMath Easy New 112 Roman Numerals to Number HashingMath +1 Medium New 113 Pascal's Triangle ArraysMath +1 Easy New 114 Spiral Walk in the Garden MatrixSimulation Medium New