0% found this document useful (0 votes)
28 views3 pages

Level-Up Coding Challenge 50 Questions

Uploaded by

debadwitys
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

Level-Up Coding Challenge 50 Questions

Uploaded by

debadwitys
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Level-Up Coding Challenge: 50 Intermediate Questions

Loops + Patterns
1. Print a right-angled triangle of * of height n.

2. Create a number pyramid: 1, 1 2, 1 2 3

3. Print an inverted triangle of stars.

4. Generate Floyd's Triangle.

5. Print a hollow square pattern of stars.

6. Create a checkerboard pattern using # and .

7. Print a triangle using alphabets like A, A B, A B C

8. Print numbers in a diamond shape.

9. Print multiplication tables from 1 to 10 using nested loops.

10. Count how many times a digit (e.g. 5) appears from 1 to 100.

Arrays - Logic & Operations


1. Check if an array is sorted.

2. Move all zeros to the end of the array.

3. Find the missing number in an array from 1 to n+1.

4. Rotate an array to the right by k positions.

5. Find duplicate elements in an array.

6. Find the element that appears once while others appear twice.

7. Merge two sorted arrays into a single sorted array.

8. Rearrange array: alternate positive and negative items.

9. Find the maximum product of two integers in an array.

10. Implement binary search on a sorted array.

Strings - Real-World Use Cases


1. Remove all spaces from a string.

2. Replace all vowels in a string with *.


3. Count the frequency of each character in a string.

4. Check if two strings are anagrams.

5. Find the first non-repeating character in a string.

6. Remove all duplicates from a string.

7. Print all substrings of a given string.

8. Convert a string to title case.

9. Find the longest word in a sentence.

10. Reverse each word in a sentence individually.

Functions & Recursion


1. Convert decimal to binary using a function.

2. Recursive sum of digits of a number.

3. Check if a number is a power of 2.

4. Find GCD of two numbers using recursion.

5. Count ways to climb stairs (1 or 2 steps) using recursion.

6. Function to compute nCr (combinations).

7. Find the sum of an array using recursion.

8. Reverse a number using a function.

9. Check if a number is a palindrome using a function.

10. Implement a calculator using switch-case or match-case.

ArrayList & HashMap Practice


1. Store top 5 student names and marks using ArrayList.

2. Print numbers divisible by 3 from an ArrayList.

3. Use HashMap to count frequency of characters in a string.

4. Build a phonebook using HashMap and search by name.

5. Remove entries from HashMap with value below threshold.

6. Return highest mark from a student HashMap.


7. Reverse a list of strings using ArrayList.

8. Merge two ArrayLists and remove duplicates.

9. Convert sentence to HashMap where key = word, value = length.

10. Create a voting system using HashMap and declare the winner.

You might also like