Blog Archives
1 4 5 6 7 8 9

Q08-Q15 written test questions and answers on core Java

Q8. What will be the statement you add so that you invoke Abc’s process( ) method?



Q16-Q24 written test questions and answers on core Java

Q16. If there is a source array list with 15MB of data, and the you create a new target empty array list and copy the source to target with target.addAll(source). …



Queue from scratch Java example

Q. If Java did not have a Queue implementation, how would you go about implementing your own? A. A queue can be implemented in a similar fashion to a stack …



Quick Sort in Java

Q. Is there a more efficient sorting algorithm than bubble sorting? A. Although bubble-sort is one of the simplest sorting algorithms, it’s also one of the slowest. It has the …



Recursion Vs Tail Recursion

Q1. Can you write a sample code that will count the number of “A”s in a given text? Show iterative, recursive, and tail recursive approaches?

“AAA rating”

A1.

Iteration



Reverse a given String

Q1. Can you write a method that reverses a given String? A1. Can be done a number of different ways. Best Practice: Using the Proven Java API



Reverse Polish Notation (RPN)

Q1. Can you explain Reverse Polish Notation (RPN)? A1. You have already heard about the following from your elementary schooling: “Please Excuse My Dear Aunt Sally” (meaning Parentheses, Exponentiation (roots …



Simple caching Java application step by step

Problem Statement: How would you go about writing an application in Java where employee id to department name lookup is cached instead of reading from a database or an API. …



Single Pointer: Partitioning around a pivotal number

Q. How will you partition the following numbers 7 3 6 8 2 9 5 4 around the pivotal number of 5 so that the lower values are in front …



Sorting a list of numbers by frequencies in Java using a BST tree

This extends Sorting a list of numbers by frequencies in Java using a map to use a BST instead of a Map.

PROBLEM to solve: Sort a list of numbers …



Sorting a list of numbers by frequencies in Java using a map

PROBLEM to solve: Sort a a list of numbers by frequency of their occurrences. For example INPUT: [ 5, 3, 7, 7, 7, 5, 4, 8 ] OUTPUT: [7, 7, …



Sorting by reversing the entries in Java

Q. You need to sort an array of integers by repeatedly reversing the order of the first several elements of it. you always have to flip from the beginning element, …



Splitting input text & string processing coding Q&A

Q1. Can you write code to extract numbers from a given input text and return the sum of those numbers? Example: “1 some text 2 more text 4 more text …



1 4 5 6 7 8 9

300+ Big Data Interview Questions - FAQs

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data