Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

How to merge linked list in java

If we have two sorted linked list and we want to merge both in a new list without creating new node space then we can use recursive approach for this . This approach takes O(max(m,n)) time complexity for merging. Like we have a linked list named : l

Deletionin linkedlist in java

A linked list is type of data structure that contains items in linear order. Deleting an item from linked list performs O(n) time complexity. you can perform two type of deletion from linked list either you can delete first item of list or in any giv

How to reverse linkedlist in java ?

There are two way to reverse a linked list that are using recursion or using iteration. This operation takes O(n) time complexity during iteration method. Here is the code to reverse linked list using iterator : public void reverseLinkedList(Node

traverse and reverse double linked list in java

Traverse and reverse a linked list takes time complexity of O(n). Traverse a double linked list requires only node next reference until it reach to trail or null value : public void traverseLinkedList(){ Node<T> tempNode = start; w

Efficient method to find maximum difference between two elements in C?

#include<stdio.h> int maxDiff(int a[], int n) { int maxDiff = -1; // Initialize Result int maxRight = a[n-1]; // Initialize max element from right side for (int i = n-2; i >= 0; i--) { if (a[i] > maxRight)

Recursion in C

Recursion is the process which repeat itself until some condition is reached otherwise it gets repeated again and again.   In programming languages, if a program allows to call a function inside the same function, then it is called a recursive

Procedural Generation

Procedural !! is the word.Have you heard it before? Have you heard about Procedural generation? Yes or No what ever your answer is, But this term blows my mind out and make me curious and to think about it. So i have done some research on it. &nbs

find the longest sub-array that all of its elements are less or equal A[i]

I have an array A[1,...,n] of positive numbers, for example: [1, 2, 5, 3, 7, 2, 8, 4] I need to build an array S[1,...,n] according to the definition: S[i] = max {k|∀i−k <j≤i :A[j] ≤ A[i] and k ≤ i} It means to find the

Three Elements of Online Marketing

Marketing is the backbone of every small and big organization. Nowadays, big companies are investing and focusing more on marketing their products and services online. Without a strong marketing strategy, it's very hard for a company to sustain i

How to disable the text select in browser with demo?

If the user doesn't want his content to be copied or only want the other user to read it. He can use the following code of lines to disable the selection of text in the browser. <div style="-moz-user-select: none; -webkit-user-select: none;

1 23 103
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: