Skip to content
sneppets

sneppets

  • Privacy

Binary Search

September 9, 2018March 11, 2020 Editorial StaffLeave a Comment on Binary Search

Binary search is also known as half-interval search or logarithmic search. It is a searching algorithm used to find the position of an element in the sorted array. The payoff for using a sorted array comes when we use a… Read More!

Algo, Java Algorithms, Datastructures, java

Linear Search

September 4, 2018December 8, 2018 Editorial StaffLeave a Comment on Linear Search

There are two search algorithms available for finding a target element within a list. One is linear search or sequential search and the other type is binary search. Linear search is very simple to implement and can be used in… Read More!

Algo, Java Algorithms, Datastructure, ds, java

Singleton pattern purpose, strategy, usage and example

August 30, 2018December 8, 2018 Editorial StaffLeave a Comment on Singleton pattern purpose, strategy, usage and example

Singleton Pattern is one of the Gangs of Four Design Patterns and comes in Creational Design Patterns that restricts the instantiation of a class and ensures only one object of the class exists in the JVM (java virtual machine) Purpose… Read More!

Java design pattern, java, singleton

Find all possible combinations of numbers to print given sum

April 2, 2018December 8, 2018 Editorial Staff1 Comment on Find all possible combinations of numbers to print given sum

The following program will print all possible combinations of additions from a given set of numbers so that they sum  up to a given target number Sum Problem: Input: X={n1,n2,n3,..n(s)}, G Output= various combinations of X(n1..n(s)), where sum of X(n)… Read More!

Java core java, interview

Folder Health Monitor Java Program

March 29, 2018December 8, 2018 Editorial Staff2 Comments on Folder Health Monitor Java Program

Write a Java program to monitor the health of folder called ‘secured’. Monitoring includes folder size should not exceed 100 MB, archive older files to another folder called ‘archive’ if entire file size exceeds 100 MB but it should retain… Read More!

Java core java, interview, java sneppets

Posts navigation

Older posts
Newer posts
Copyright © 2018 Sneppets. All Rights Reserved