Clustering algorithms are one of the most popular algorithm used by machine learning practitioners across the world for classification problems. …

Clustering algorithms are one of the most popular algorithm used by machine learning practitioners across the world for classification problems. …

It can be called as one of the most oldest data visualisation innovation. Florence Nightingale came up with an idea to plot the bar graphs one upon the other, without losing any valuable insights. She did this by plotting not along an X-Y axis, but but eliminating the length of…

I have a very large integer value such as 2874. I wrote a function that can return me a list containing all possible outcomes if I start placing commas between this large integer value. How can i reduce the complexity of this function

Input:

`2874`

Output:

`[[2874],[2,874],[28,74],[287,4],[2,8,74],[2,87,4],[28,7,4],[2,8,7,4]]`

Explanation:

`#zero commas`

[2874]

#one…

Jump Search is a searching algorithm for sorted arrays. The basic idea is to check fewer elements (than linear search) by jumping ahead by fixed steps or skipping some elements in place of searching all elements.

For example, suppose we have an array arr[] of size n and block (to be…

Search a sorted or non-sorted array by repeatedly dividing the search interval in half. Begin with an interval covering the whole array. If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. Otherwise, narrow it…

Given two numbers represented by two linked lists of size **N** and **M**. The task is to return a sum list. The sum list is a linked list representation of the addition of two input numbers from the last.

**Example 1:**

**Input:**

N = 2

valueN[] = {4,5}

M = 3

valueM[] = {3,4,5}

**Output…**

Given a Binary Tree, print Left view of it. Left view of a Binary Tree is set of nodes visible when tree is visited from Left side. The task is to complete the function **leftView()**, which accepts root of the tree as argument.

Left view of following tree is 1…

Given an array of integers of size N find subarray with maximum xor. A subbarray is a contiguous part of array.

**Example 1:**

**Input**:

N = 4

arr[] = {1,2,3,4}

**Output:** 7

**Explanation**:

The subarray {3,4} has maximum xor

value equal to 7.

**Your Task: **

You don’t need to read…

Given two distinct words **startWord** and **targetWord**, and a list denoting **wordList** of unique words of equal lengths. Find the length of the shortest transformation sequence from startWord to targetWord.

Keep the following conditions in mind:

- A word can only consist of lowercase characters.
- Only one letter can be changed…

Ugly numbers are numbers whose **only prime factors are 2, 3 or 5**. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, … shows the first 11 ugly numbers. By convention, 1 is included. Write a program to find **Nth** Ugly Number.

**Example 1:**

**Input:**

N =…