[go: up one dir, main page]

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

Java Interview Coding Assessment

The document outlines a comprehensive Java coding and interview assessment divided into five sections: OOPs, String Handling, Arrays, Conditional Statements, and Looping Statements. Each section contains various challenges ranging from intermediate to hard difficulty, focusing on key programming concepts such as design patterns, string manipulation, array algorithms, and control flow. Additionally, there are bonus logical and analytical problems to further test candidates' skills.
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)
17 views3 pages

Java Interview Coding Assessment

The document outlines a comprehensive Java coding and interview assessment divided into five sections: OOPs, String Handling, Arrays, Conditional Statements, and Looping Statements. Each section contains various challenges ranging from intermediate to hard difficulty, focusing on key programming concepts such as design patterns, string manipulation, array algorithms, and control flow. Additionally, there are bonus logical and analytical problems to further test candidates' skills.
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

Comprehensive Java Coding and Interview Assessment

SECTION 1: OOPs in Java

**Design Pattern Challenge (Hard)** Design a simplified Banking System using OOP principles, with features

like account creation, withdrawal, deposit, and balance check. Use interfaces and abstract classes properly.

**Polymorphism & Inheritance (Intermediate)** Create a Shape class with subclasses like Circle, Rectangle,

and Square. Override an area() method.

**Encapsulation Validation System (Intermediate)** Create a User class where private fields are only set

through valid setters (e.g., age > 18, email format validation).

**Abstract Factory Pattern (Hard)** Build an abstract factory for GUI widgets supporting two OS types (e.g.,

Windows and Mac). Demonstrate polymorphic behavior.

SECTION 2: String Handling in Java

**Anagram Checker (Intermediate)** boolean isAnagram(String s1, String s2);

**Longest Palindromic Substring (Hard)** Return the longest palindromic substring in a given string using

dynamic programming.

**Regex Filter (Intermediate)** Write a function to extract all email IDs from a paragraph using regex.

**Custom Compression (Hard)** Implement a basic string compression algorithm: "aabcccccaaa" becomes

"a2b1c5a3".

**String Permutations (Hard)** Generate all permutations of a given string without using recursion.

SECTION 3: Arrays

**Maximum Subarray Sum (Kadane's Algorithm) (Intermediate)** Find the contiguous subarray with the

maximum sum.
Comprehensive Java Coding and Interview Assessment

**Product of Array Except Self (Hard)** Return an array where each element is the product of all elements

except itself without using division.

**Spiral Matrix (Intermediate)** Traverse a 2D matrix in spiral order.

**Sliding Window Maximum (Hard)** Given an array and a window size k, return the maximum for each

window.

**Rotate Matrix (Hard)** Rotate a NxN matrix 90 degrees clockwise in-place.

SECTION 4: Conditional Statements

**Grading System (Intermediate)** Implement a grading system using nested if-else: marks -> grade (A to F).

**Traffic Light Controller (Intermediate)** Use switch-case to simulate a traffic signal controller.

**Complex Ternary Puzzle (Intermediate)** Write a compact expression to return the smallest of three

numbers using the ternary operator.

SECTION 5: Looping Statements

**Prime Number Generator (Intermediate)** Print all primes between 1 and N using loop and efficient

checking (Sieve optional).

**Pattern Printing (Intermediate)** Print: 1 2 3 4 5 6 ...

**Fibonacci with Loop (Intermediate)** Generate first N Fibonacci numbers without recursion.

**Nested Loop Puzzle (Hard)** Count how many times a digit d appears in all numbers from 1 to N.

Bonus: Logical & Analytical


Comprehensive Java Coding and Interview Assessment

**Sudoku Validator (Hard)** Validate a given 9x9 Sudoku board.

**Rat in a Maze (Backtracking) (Hard)** Find all paths for a rat from top-left to bottom-right.

**Stock Buy-Sell Max Profit (Hard)** Return max profit from a list of daily stock prices.

**Robot Moves (Intermediate)** Given a string of moves (UDLR), check if the robot returns to origin.

You might also like