Skip to content
sneppets

sneppets

  • Privacy

How to sort numeric strings as numbers in mongodb

March 17, 2020March 17, 2020 Editorial StaffLeave a Comment on How to sort numeric strings as numbers in mongodb

This tutorial guides you how to compare and sort numeric strings as numbers in mongodb using Collation feature of Mongo.

MongoDB mongodb, sort, String
insertion sort

Insertion Sort in Java and Complexity Analysis

September 27, 2018December 8, 2018 Editorial StaffLeave a Comment on Insertion Sort in Java and Complexity Analysis

Insertion sort consumes or marks one element in each iteration from the array of elements and grows the sorted output list. At each iteration, insertion sort removes one element from the input array and insert that element in a location… Read More!

Java Algorithms, insertion sort, sort
selection sort

Selection Sort in Java and Complexity Analysis

September 26, 2018December 8, 2018 Editorial StaffLeave a Comment on Selection Sort in Java and Complexity Analysis

Selection sort is a sorting algorithm, precisely an in-place comparison sort. The selection sort improves over the bubble sort by reducing the number of swapping necessary from O(n2) to O(n). But the number of comparisons remains O(n2). Selection Sort Java… Read More!

Algo, Java Algorithms, selection sort, sort
bubble sort

Bubble Sort in Java and Complexity Analysis

September 25, 2018December 8, 2018 Editorial StaffLeave a Comment on Bubble Sort in Java and Complexity Analysis

Bubble Sort is a simple sorting algorithm that repeatedly steps through the list to be sorted and compares each pair of adjacent elements in the list and swaps them if they are not in order. This algorithm is too slow… Read More!

Algo, Java Algorithms, bubble sort, sort
Copyright © 2018 Sneppets. All Rights Reserved