[go: up one dir, main page]

0% found this document useful (0 votes)
2 views2 pages

Coding Questions 10 Pages

The document lists coding questions focused on Java and Data Structures & Algorithms (DSA) across various topics including Arrays, Strings, Recursion, Sorting Algorithms, Linked Lists, Stack and Queue, Number Problems, 2D Arrays and Matrix, Patterns, and Java OOP Programs. Each category contains five specific coding challenges aimed at testing and improving programming skills. This comprehensive collection serves as a resource for practice and preparation in coding interviews.

Uploaded by

krishnapallan128
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)
2 views2 pages

Coding Questions 10 Pages

The document lists coding questions focused on Java and Data Structures & Algorithms (DSA) across various topics including Arrays, Strings, Recursion, Sorting Algorithms, Linked Lists, Stack and Queue, Number Problems, 2D Arrays and Matrix, Patterns, and Java OOP Programs. Each category contains five specific coding challenges aimed at testing and improving programming skills. This comprehensive collection serves as a resource for practice and preparation in coding interviews.

Uploaded by

krishnapallan128
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/ 2

Coding Questions (Java + DSA Focus)

Arrays

1. Find the largest and smallest element in an array


2. Reverse an array in-place
3. Check if an array is sorted
4. Rotate an array by k steps
5. Find the missing number in an array from 1 to N

Strings

1. Check if a string is a palindrome


2. Count vowels and consonants
3. Find the first non-repeating character
4. Reverse a string
5. Check if two strings are anagrams

Recursion

1. Find factorial of a number using recursion


2. Print numbers from 1 to N using recursion
3. Fibonacci series using recursion
4. Sum of digits using recursion
5. Power of a number using recursion (x^n)

Sorting Algorithms

1. Bubble Sort
2. Selection Sort
3. Insertion Sort
4. Merge Sort
5. Quick Sort (basic partitioning logic)

Linked List

1. Insert a node at the beginning


2. Insert a node at the end
3. Reverse a linked list (iterative)
4. Find middle element of linked list
5. Detect loop in a linked list

Stack and Queue

1. Implement a stack using array


2. Implement a queue using array
3. Reverse a string using stack
4. Valid Parentheses using stack
5. Implement circular queue logic
Coding Questions (Java + DSA Focus)

Number Problems

1. Check if number is prime


2. Find GCD of two numbers (Euclid's algorithm)
3. Count the number of digits in a number
4. Check if a number is Armstrong
5. Find sum of digits of a number

2D Arrays and Matrix

1. Print a 2D matrix
2. Transpose a matrix
3. Sum of diagonals of a matrix
4. Search an element in a 2D matrix
5. Rotate matrix 90 degrees clockwise

Patterns

1. Print a right-angled triangle of stars


2. Print a pyramid pattern
3. Print a number triangle
4. Diamond star pattern
5. Pascal's triangle

Java OOP Programs

1. Create a Student class with properties and methods


2. Implement a BankAccount class with deposit and withdraw
3. Constructor overloading example
4. Vehicle -> Car inheritance example with method overriding
5. Interface and implementation example (Shape -> Circle, Square)

You might also like