Skip to content

withexample.com

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

Author: admin

Water Container Problem (Java)

August 27, 2017 admin Leave a comment

Problem: Given an array of heights, find out the max area that can be formed between any two bars. Solution: The…

Continue Reading →

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

Leet Code – 49. Group Anagrams

August 12, 2017 admin Leave a comment

Given an array of strings, group anagrams together. For example, given:[“eat”, “tea”, “tan”, “ate”, “nat”, “bat”] Return:

1
2
3
4
5
[
  ["ate", "eat","tea"],
  ["nat","tan"],
  ["bat"]
]

Note: All inputs…

Continue Reading →

Posted in: JavaScript, Leet Code Filed under: anagrams, group anagrams

Stack implementation using Array

July 27, 2017 admin Leave a comment

Stack is an abstract data type. The basic operation of the stack can be: Push : Push object on top of stack. Throws an…

Continue Reading →

Posted in: DS And Algo, Java Filed under: Data Structure, Java

Insertion Sort implementation in Java

admin Leave a comment

One of the simplest (in terms of understanding :P) sorting technique is Insertion Sort. You will find many sites giving…

Continue Reading →

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

String Operations

admin Leave a comment

1.Reverse string using loop Reverse string using iterator Check whether string is palindrome or not Below is my project explorer…

Continue Reading →

Posted in: Java Filed under: Java Interview Questions

How to Add new row to DataFrame in R

admin Leave a comment

Suppose your dataSet is Cats, given in the MASS library. If you want to load then type following commands in R console…

Continue Reading →

Posted in: Miscellaneous Filed under: R

Binary Tree Insertion, Deletion, Search, Traversal in Java

admin Leave a comment

Basic traversal on tree is best explained on http://en.wikipedia.org/wiki/Tree_traversal . In Order: Pre Order: Post Order: If anything is missing in explanation, you…

Continue Reading →

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

QuickSort implementation example using ArrayList in Java

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

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