Skip to content

withexample.com

Motherload of coding examples
  • With Example
  • Interview Questions
    • HackerRank
  • DS and Algo
    • DS And Algo
  • General
    • Java
    • JavaScript
  • Miscellaneous

Category: Java

QuickSort implementation example using ArrayList in Java

July 27, 2017 admin Leave a comment

So here is another sorting algorithm, “Quick Sort” which I have implemented it using ArrayList which is inplace sorting algorithm. Worst case…

Continue Reading →

Posted in: DS And Algo, Java Filed under: Algorithm, java algorithm

Selection Sort using ArrayList (Inplace) in Java

admin Leave a comment

One more simple form of sorting algorithm is Selection Sort. For in-place implementation in java, starting from 1st index, find the smallest…

Continue Reading →

Posted in: DS And Algo, Java Filed under: Algorithm, java algorithm

Merge sort using ArrayList in Java with example

admin Leave a comment

So here is another sorting algorithm, “Merge Sort” which I have implemented it using ArrayList. MergeSort follows the Divide and Conquer paradigm. Divide part…

Continue Reading →

Posted in: DS And Algo, Java Filed under: Algorithm

Parentheses / Brackets Check (Hacker Rank Interview Questions)

admin Leave a comment

Match the braces and verify whether all the opening braces has the closing braces in right order. Input: String of…

Continue Reading →

Posted in: HackerRank, Java Filed under: Hackerrank, Java Interview Questions

The caterpillar problem (Hacker Rank Interview Questions)

July 26, 2017 admin Leave a comment

The caterpillar problem. Input: int[] caterPillar = {2,4,5} int totalLeaves = 10 Here, you will have fixed size array with integer elements…

Continue Reading →

Posted in: HackerRank, Java Filed under: Hackerrank, Harker Rank, Java

Total Number of Perfect Squares (Hacker Rank Interview Question)

admin Leave a comment

Problem: Finding the number of perfect squares between two integer range. Input: first integer and last integer ->  int startInteger,…

Continue Reading →

Posted in: HackerRank, Java Filed under: Hackerrank, Java, Java Interview Questions

Find unique pairs with k difference (KDiff) (Hacker Rank Interview Question)

admin Leave a comment

Input: Integer array Diff: Integer difference Output: Total number of unique pairs having difference provided in the input. Here in…

Continue Reading →

Posted in: HackerRank, Java Filed under: Hackerrank, Java, Java Interview Questions

Count Duplicate Pairs of Integer in a given array (Hacker Rank Interview Questions)

admin Leave a comment

Input: Integer array with 0 or more repeated values. Output: Total number of duplicate numbers present in the given array…

Continue Reading →

Posted in: HackerRank, Java Filed under: Hackerrank, interviewquestions, Java, Java Interview Questions

Print all the possible permutations by adding X and Y (Hacker Rank Interview Question)

July 22, 2017 admin Leave a comment

Input: X and Y are integer values, where X < Y N is the length of permutation Output: To print…

Continue Reading →

Posted in: HackerRank, Java Filed under: Hackerrank, Java, Java Interview Questions

Slice Down problem in Java (Hacker Rank Interview Questions)

admin Leave a comment

Input: array of integer value Output: print each iteration by subtracting the smallest elements till array becomes empty For example:…

Continue Reading →

Posted in: HackerRank, Java Filed under: Harker Rank, interviewquestions, Java, Slice Down Hacker Rank

Posts navigation

← Older posts
Newer posts →

Quick Links

Algorithm anagrams Binary Search Tree binarysearchtree bst Calculator Data Structure debounce Fibonacci Fibonacci Java Fibonacci Multi Threading FrontEnd front end FrontEnd interview questions Gradle group anagrams Hackerrank Harker Rank html Integration interviewquestions interview questions Java java algorithm Java Interview Questions javascript JavaScript interview questions Jmeter LeetCode MongoDB Neo4j Preorder Binary Search Tree Preorder BST R Slice Down Hacker Rank wcag web accessibility

Login

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
Copyright © 2023 withexample.com — Primer theme by GoDaddy