## Find the kth to last element of a singly linked list

Problem description : Implement a non-recursive algorithm to find the kth to last element of a singly linked list. Input : A linked list Output : A value of a node in a linked...

Skip to content# Author: Kavit

## Find the kth to last element of a singly linked list

## Closest pair of numbers

## Delete a node from a linked list in javascript

## Remove duplicates from an unsorted linked list

## Javascript linked list example

## Find all the prime factors for the given number

## Transform json to json

## Check if an element exists in an array, based on that update an array

## Determine character frequency in the given string

## Convert the given array of elements to a string

Problem description : Implement a non-recursive algorithm to find the kth to last element of a singly linked list. Input : A linked list Output : A value of a node in a linked...

Problem description : Given a list of unsorted integers, find the pair of elements that have the smallest absolute difference between them? If there are multiple pairs, find them all and return them in...

Problem description : Write a method to remove a node from a linked list. Input: A linked list Output: A linked list with one less node Logic : Iterate through the list, if you...

Problem description : Write a method to remove duplicates from an unsorted linked list. Input : A linked list Output : A linked list with unique elements This post is a follow-up of JavaScript...

Challenge Problem : Implement LinkedList in javascript, with a following method: insertNodeAtTail – adds a node to the tail of a linked list. deleteNode – delets a node from the linked list and updates...

Input : A number // 10 Output : An array // [2, 5] Logic : Key here is that we need to check the divisor starting with 2 to the square root of the...

Problem description : Write a function which transforms the given JSON as shown belows : Input : Given an endorsment array with objects containing skill and user keys var endorsements = [ { skill:...

Problem description : Write a function which detects if the given element exists in an array or not. If it does not exist then adds it to an array If it does exist then...

Problem description : Create a character frequency analysis table for the given string. Input : A string // “foo bar” Output : A JSON // {” “: 1, a: 1, b: 1, f: 1,...

Problem description : Write a function that converts a given array into a string. Input : An Array Output : A String Logic : Iterate through array concatenate the new element into the string...