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: DS And Algo

Longest Increasing Subsequence, Leetcode, Dynamic programming

July 14, 2018 admin Leave a comment

Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18 Output: 4 Explanation: The longest…

Continue Reading →

Posted in: DS And Algo, JavaScript, Leet Code, Uncategorized

Print all combinations of points from given set of input that can compose a given number. (Recursive & Dynamic approach)

September 10, 2017 admin Leave a comment

Problem: Print all combinations of points from given a set of input that can compose a given number. (Recursive and…

Continue Reading →

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

Find child having n parent ( Graph Problem )

September 5, 2017 admin Leave a comment

Question: Suppose we have some input data describing a graph of relationships between parents and children over multiple generations. The…

Continue Reading →

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

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

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

When Binary Search Tree can perform worst?

January 17, 2017 admin Leave a comment

We all know that a binary search tree operations are of O(log n). But there can be a worst scenario…

Continue Reading →

Posted in: DS And Algo, Java Filed under: binarysearchtree, bst, interviewquestions

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