Horner's Method for Polynomial Evaluation | GeeksforGeeks Given a polynomial of the form cnxn + cn-1xn...

Please Visit: http://ift.tt/1ajReyV



Horner's Method for Polynomial Evaluation | GeeksforGeeks

Given a polynomial of the form cnxn + cn-1xn-1 + cn-2xn-2 + … + c1x + c0 and a value of x, find the value of polynomial for a given value of x. Here cn, cn-1, .. are integers (may be negative) and n is a positive integer.

http://ift.tt/SeVkGI

http://ift.tt/1ikMIup



Horner's Method for Polynomial Evaluation | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1ikMIur

via LifeLong Community

Count trailing zeroes in factorial of a number | GeeksforGeeks Given an integer n, write a function ...

Please Visit: http://ift.tt/1ajReyV



Count trailing zeroes in factorial of a number | GeeksforGeeks

Given an integer n, write a function that returns count of trailing zeroes in n!.

http://ift.tt/1l2MxA7

http://ift.tt/1ikMGTx



Count trailing zeroes in factorial of a number | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/Tjac7t

via LifeLong Community

Write a function that generates one of 3 numbers according to given probabilities | GeeksforGeeks You...

Please Visit: http://ift.tt/1ajReyV



Write a function that generates one of 3 numbers according to given probabilities | GeeksforGeeks

You are given a function rand(a, b) which generates equiprobable random numbers between [a, b] inclusive. Generate 3 numbers x, y, z with probability P(x), P(y), P(z) such that P(x) + P(y) + P(z) = 1 using the given rand(a,b) function.

The idea is to utilize the equiprobable feature of the rand(a,b) provided. Let the given probabilities be in percentage form, for example P(x)=40%, P(y)=25%, P(z)=35%..

http://ift.tt/1n4fdLL

http://ift.tt/1ikMFis



Write a function that generates one of 3 numbers according to given probabilities | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1ikMGTk

via LifeLong Community

Find the smallest number whose digits multiply to a given number n | GeeksforGeeks Given a number ‘n...

Please Visit: http://ift.tt/1ajReyV



Find the smallest number whose digits multiply to a given number n | GeeksforGeeks

Given a number ‘n’, find the smallest number ‘p’ such that if we multiply all digits of ‘p’, we get ‘n’. The result ‘p’ should have minimum two digits.

http://ift.tt/SqjxK1

http://ift.tt/1lYaZ44



Find the smallest number whose digits multiply to a given number n | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/UtFbyA

via LifeLong Community

Next Greater Element | GeeksforGeeks Given an array, print the Next Greater Element (NGE) for every ...

Please Visit: http://ift.tt/1ajReyV



Next Greater Element | GeeksforGeeks

Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element on the right side of x in array. Elements for which no greater element exist, consider next greater element as -1.

Examples:

a) For any array, rightmost element always has next greater element as -1.

b) For an array which is sorted in decreasing order, all elements have next greater element as -1.

http://ift.tt/UtFbi4

http://ift.tt/UtFbi6



Next Greater Element | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lYb0oQ

via LifeLong Community

Check for balanced parentheses in an expression | GeeksforGeeks Given an expression string exp, write...

Please Visit: http://ift.tt/1ajReyV



Check for balanced parentheses in an expression | GeeksforGeeks

Given an expression string exp, write a program to examine whether the pairs and the orders of “{“,”}”,”(“,”)”,”[","]” are correct in exp. For example, the program should print true for exp = “[()]{}{[()()]()}” and false for exp = “[(])”

Algorithm:

1) Declare a character stack S.

2) Now traverse the expression string exp.

a) If the current character is a starting bracket (‘(‘ or ‘{‘ or ‘[') then push it to stack.

b) If the current character is a closing bracket (')' or '}' or ']‘) then pop from stack and if the popped character is the matching starting bracket then fine else parenthesis are not balanced.

3) After complete traversal, if there is some starting bracket left in stack then “not balanced”

http://ift.tt/UtF8CX

http://ift.tt/1lYaXte



Check for balanced parentheses in an expression | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/UtF8D1

via LifeLong Community

Implement two stacks in an array | GeeksforGeeks Create a data structure twoStacks that represents two...

Please Visit: http://ift.tt/1ajReyV



Implement two stacks in an array | GeeksforGeeks

Create a data structure twoStacks that represents two stacks. Implementation of twoStacks should use only one array, i.e., both stacks should use the same array for storing elements. Following functions must be supported by twoStacks.

http://ift.tt/1lYaXsZ

http://ift.tt/UtFaL2



Implement two stacks in an array | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lYaXt1

via LifeLong Community

Implement Queue using Stacks | GeeksforGeeks http://ift.tt/1wemM6z http:/...

Please Visit: http://ift.tt/1ajReyV



Implement Queue using Stacks | GeeksforGeeks

http://ift.tt/1wemM6z

http://ift.tt/1lHLJVO



Implement Queue using Stacks | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lHLHNx

via LifeLong Community

Find the first circular tour that visits all petrol pumps | GeeksforGeeks Suppose there is a circle...

Please Visit: http://ift.tt/1ajReyV



Find the first circular tour that visits all petrol pumps | GeeksforGeeks

Suppose there is a circle. There are n petrol pumps on that circle. You are given two sets of data.

1. The amount of petrol that petrol pump will give.

2. Distance from that petrol pump to the next petrol pump.

Calculate the first point from where a truck will be able to complete the circle (The truck will stop at each petrol pump and it has infinite capacity). Expected time complexity is O(n).

http://ift.tt/1wemLPW

http://ift.tt/1lHLHNt



Find the first circular tour that visits all petrol pumps | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1wemLQ3

via LifeLong Community

Check whether a given Binary Tree is Complete or not | GeeksforGeeks Given a Binary Tree, write a function...

Please Visit: http://ift.tt/1ajReyV



Check whether a given Binary Tree is Complete or not | GeeksforGeeks

Given a Binary Tree, write a function to check whether the given Binary Tree is Complete Binary Tree or not.

http://ift.tt/1wemLzi

http://ift.tt/1lHLHxb



Check whether a given Binary Tree is Complete or not | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lHLHxd

via LifeLong Community

*Sliding Window Maximum | LeetCode*A long array A[] is given to you. There is a sliding window of size...

Please Visit: http://ift.tt/1ajReyV



*Sliding Window Maximum | LeetCode*A long array A[] is given to you. There is a sliding window of size w which is moving from the very left of the array to the very right. You can only see the w numbers in the window. Each time the sliding window moves rightwards by one position. Following is an example:

The array is [1 3 -1 -3 5 3 6 7], and w is 3.

http://ift.tt/1lHLHx7

http://ift.tt/1wemLiS



Sliding Window Maximum | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lHLJVz

via LifeLong Community

Maximum of all subarrays of size k (Added a O(n) method) | GeeksforGeeks Given an array and an integer...

Please Visit: http://ift.tt/1ajReyV



Maximum of all subarrays of size k (Added a O(n) method) | GeeksforGeeks

Given an array and an integer k, find the maximum for each and every contiguous subarray of size k.

http://ift.tt/1lHLJoG

http://ift.tt/1wemJYn



Maximum of all subarrays of size k (Added a O(n) method) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1wemJYp

via LifeLong Community

Find the largest multiple of 3 | GeeksforGeeks Given an array of non-negative integers. Find the largest...

Please Visit: http://ift.tt/1ajReyV



Find the largest multiple of 3 | GeeksforGeeks

Given an array of non-negative integers. Find the largest multiple of 3 that can be formed from array elements.

For example, if the input array is {8, 1, 9}, the output should be “9 8 1″, and if the input array is {8, 1, 7, 6, 0}, output should be “8 7 6 0″.

http://ift.tt/1nUpLgL

http://ift.tt/UrosMe



Find the largest multiple of 3 | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1nUpN8y

via LifeLong Community

Ternary Search Tree | GeeksforGeeks http://ift.tt/1m1OP6w

Please Visit: http://ift.tt/1ajReyV



Ternary Search Tree | GeeksforGeeks

http://ift.tt/1m1OP6w



Ternary Search Tree | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1iSlOF9

via LifeLong Community

Java Program to Implement Ternary Search Tree | Sanfoundry A ternary search tree is a type of prefix...

Please Visit: http://ift.tt/1ajReyV



Java Program to Implement Ternary Search Tree | Sanfoundry

A ternary search tree is a type of prefix tree where nodes are arranged as a binary search tree. Like other prefix trees, a ternary search tree can be used as an associative map structure with the ability for incremental string search.

http://ift.tt/1iSlQwv

http://ift.tt/1iSlOov



Java Program to Implement Ternary Search Tree | Sanfoundry







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1iSlQwH

via LifeLong Community

Ternary Search Tree Ternary search tree is one of the most interesting data structures in its field ...

Please Visit: http://ift.tt/1ajReyV



Ternary Search Tree

Ternary search tree is one of the most interesting data structures in its field of knowledge, as it combines storage efficiency with fast lookups and ability to perform a prefix search.

http://ift.tt/1lcShKR

http://ift.tt/1iSlNRx



Ternary Search Tree







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lcSk9m

via LifeLong Community

Efficient auto-complete with a ternary search tree http://ift.tt/1lcSgXk...

Please Visit: http://ift.tt/1ajReyV



Efficient auto-complete with a ternary search tree

http://ift.tt/1if6QeB



Efficient auto-complete with a ternary search tree







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1iSlN40

via LifeLong Community

Segment tree - PEGWiki The segment tree is a highly versatile divide-and-conquer (Link->http://wcipeg.com...

Please Visit: http://ift.tt/1ajReyV



Segment tree - PEGWiki

The segment tree is a highly versatile divide-and-conquer (Link->http://ift.tt/1iSlMwW) paradigm, which can be thought of as a tree of intervals of an underlying array, constructed so that queries on ranges of the array as well as modifications to the array's elements may be efficiently performed.

http://ift.tt/1iSlKoJ

http://ift.tt/1iSlKoK



Segment tree - PEGWiki







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lcSeyH

via LifeLong Community

Segment Tree | Set 1 (Sum of given range) | GeeksforGeeks http://ift.tt/1lcSei1...

Please Visit: http://ift.tt/1ajReyV



Segment Tree | Set 1 (Sum of given range) | GeeksforGeeks

http://ift.tt/1iSlJRL



Segment Tree | Set 1 (Sum of given range) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lcSgqd

via LifeLong Community

Changing Bits: Fast range faceting using segment trees and the Java ASM library http://ift.tt/1j7sWN0...

Please Visit: http://ift.tt/1ajReyV



Changing Bits: Fast range faceting using segment trees and the Java ASM library

http://ift.tt/1kjSNnm



Changing Bits: Fast range faceting using segment trees and the Java ASM library







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lcSdLa

via LifeLong Community

Segment Tree - Codeforces ProblemThe problem that a segment tree can solve is the following. We are ...

Please Visit: http://ift.tt/1ajReyV



Segment Tree - Codeforces

ProblemThe problem that a segment tree can solve is the following. We are given an array of values a[0], a[1], ..., a[N - 1]. Assume without loss of generality that N = 2n; we can generally pad the computations accordingly. Also, consider some associative binary function f. Examples of f include sum, min, max, or gcd (as in the Timus problem). Segment trees allow for each of the following two operations on O(logN) time:compute f(a[i], a[i + 1], ..., a[j]) for i ≤ j; and

update a[x] = v.

http://ift.tt/1pt4BYy

http://ift.tt/1pmP0rH



Segment Tree - Codeforces







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pt4Anu

via LifeLong Community

Print unique rows in a given boolean matrix | GeeksforGeeks Given a binary matrix, print all unique...

Please Visit: http://ift.tt/1ajReyV



Print unique rows in a given boolean matrix | GeeksforGeeks



Given a binary matrix, print all unique rows of the given matrix.

http://ift.tt/1pt4A6Y

http://ift.tt/1pmOYzO



Print unique rows in a given boolean matrix | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pmOYzS

via LifeLong Community

Find the k most frequent words from a file | GeeksforGeeks Given a book of words. Assume you have enough...

Please Visit: http://ift.tt/1ajReyV



Find the k most frequent words from a file | GeeksforGeeks



Given a book of words. Assume you have enough main memory to accommodate all words. design a data structure to find top K maximum occurring words. The data structure should be dynamic so that new words can be added.

http://ift.tt/MHJJ0G

http://ift.tt/1pt4BrE



Find the k most frequent words from a file | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pt4BHS

via LifeLong Community

Greedy Algorithms | Set 5 (Prim’s Minimum Spanning Tree (MST)) | GeeksforGeeks Like Kruskal’s algorithm...

Please Visit: http://ift.tt/1ajReyV



Greedy Algorithms | Set 5 (Prim’s Minimum Spanning Tree (MST)) | GeeksforGeeks

Like Kruskal’s algorithm, Prim’s algorithm is also a Greedy algorithm (Link->http://ift.tt/1stB6cV) . It starts with an empty spanning tree. The idea is to maintain two sets of vertices. The first set contains the vertices already included in the MST, the other set contains the vertices not yet included. At every step, it considers all the edges that connect the two sets, and picks the minimum weight edge from these edges. After picking the edge, it moves the other endpoint of the edge to the set containing MST.

http://ift.tt/1stB4l5

http://ift.tt/1iRgPnU



Greedy Algorithms | Set 5 (Prim’s Minimum Spanning Tree (MST)) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1stB6cX

via LifeLong Community

Adaptive Huffman Coding Huffman coding suffers from the fact that the uncompresser need have some knowledge...

Please Visit: http://ift.tt/1ajReyV



Adaptive Huffman Coding

Huffman coding suffers from the fact that the uncompresser need

have some knowledge of the probabilities of the characters in the

compressed files. Not only can this add somewhat to the bits

needed to encode the file, but, if this crucial piece of knowledge

is unavailable, compressing the file requires two passes- one pass

to find the frequency of each character and construct the huffman

tree and a second pass to actually compress the file. Expanding

on the huffman algorithm, Faller and Gallagher, and later Knuth

and Vitter, developed a way to perform the huffman algorithm as a

one pass procedure.

http://ift.tt/1lRxCr1

http://ift.tt/UnpIQx



Adaptive Huffman Coding







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lRxEiE

via LifeLong Community

Greedy Algorithms | Set 3 (Huffman Coding) | GeeksforGeeks Huffman coding is a lossless data compression...

Please Visit: http://ift.tt/1ajReyV



Greedy Algorithms | Set 3 (Huffman Coding) | GeeksforGeeks

Huffman coding is a lossless data compression algorithm. The idea is to assign variable-legth codes to input characters, lengths of the assigned codes are based on the frequencies of corresponding characters. The most frequent character gets the smallest code and the least frequent character gets the largest code.

http://ift.tt/UnpKYz

http://ift.tt/1lRxCax



Greedy Algorithms | Set 3 (Huffman Coding) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/UnpKYF

via LifeLong Community

Convert YouTube Videos to MP4 With VLC Media Player http://ift.tt/UnpIjC...

Please Visit: http://ift.tt/1ajReyV



Convert YouTube Videos to MP4 With VLC Media Player

http://ift.tt/UnpKrH



Have you downloaded YouTube videos and need to quickly convert from FLV to MP4? The Flash video format is used on sites like YouTube, but not all PMP / MP3 players support it. Rather than finding an app for your particular device (iPhone, iPod Touch, etc.), and having to download them all again, why not use VLC Player to quickly convert them to MP4? To find out more, follow this tutorial which shows you how to convert your downloaded videos in a ...







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/UnpKrI

via LifeLong Community

Detect Cycle in a Directed Graph | GeeksforGeeks Given a directed graph, check whether the graph contains...

Please Visit: http://ift.tt/1ajReyV



Detect Cycle in a Directed Graph | GeeksforGeeks

Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least one cycle, else return false.

http://ift.tt/1lOrHD8

http://ift.tt/UkFjQL



Detect Cycle in a Directed Graph | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/UkFkEz

via LifeLong Community

Union-Find Algorithm | Set 2 (Union By Rank and Path Compression) | GeeksforGeeks The idea is to always...

Please Visit: http://ift.tt/1ajReyV



Union-Find Algorithm | Set 2 (Union By Rank and Path Compression) | GeeksforGeeks

The idea is to always attach smaller depth tree under the root of the deeper tree. This technique is called union by rank.

http://ift.tt/1lOrEXP

http://ift.tt/UkFkEm



Union-Find Algorithm | Set 2 (Union By Rank and Path Compression) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lOrEXT

via LifeLong Community

Union-Find Algorithm | Set 1 (Detect Cycle in a an Undirected Graph) | GeeksforGeeks int find(int parent...

Please Visit: http://ift.tt/1ajReyV



Union-Find Algorithm | Set 1 (Detect Cycle in a an Undirected Graph) | GeeksforGeeks

int find(int parent[], int i){ if (parent[i] == 1) return i; return find(parent, parent[i]);} // A utility function to do union of two subsets void Union(int parent[], int x, int y){ int xset = find(parent, x); int yset = find(parent, y); parent[xset] = yset;} // The main function to check whether a given graph contains cycle or notint isCycle( struct Graph* graph ){ // Allocate memory for creating V subsets int parent = (int ) malloc( graph>V * sizeof(int) ); // Initialize all subsets as single element sets memset(parent, 1, sizeof(int) * graph>V); // Iterate through all edges of graph, find subset of both // vertices of every edge, if both subsets are same, then there is // cycle in graph. for(int i = 0; i < graph->E; ++i) { int x = find(parent, graph->edge[i].src); int y = find(parent, graph->edge[i].dest); if (x == y) return 1; Union(parent, x, y); } return 0;}

http://ift.tt/1lOrEHl

http://ift.tt/UkFhIR



Union-Find Algorithm | Set 1 (Detect Cycle in a an Undirected Graph) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lOrEHo

via LifeLong Community

Greedy Algorithms | Set 2 (Kruskal’s Minimum Spanning Tree Algorithm) | GeeksforGeeks http://www.gee...

Please Visit: http://ift.tt/1ajReyV



Greedy Algorithms | Set 2 (Kruskal’s Minimum Spanning Tree Algorithm) | GeeksforGeeks

http://ift.tt/UkFhsm



Greedy Algorithms | Set 2 (Kruskal’s Minimum Spanning Tree Algorithm) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lOrGPB

via LifeLong Community

Write a C program to calculate pow(x,n) | GeeksforGeeks float power(float x, int y){ float temp; if(...

Please Visit: http://ift.tt/1ajReyV



Write a C program to calculate pow(x,n) | GeeksforGeeks

float power(float x, int y){ float temp; if( y == 0) return 1; temp = power(x, y/2); if (y%2 == 0) return temp*temp; else { if(y > 0) return x*temp*temp; else return (temp*temp)/x; }}

http://ift.tt/1l3777t

http://ift.tt/UkFgEO



Write a C program to calculate pow(x,n) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/UkFiME

via LifeLong Community

Program for Fibonacci numbers | GeeksforGeeks http://ift.tt/UkFhZ8...

Please Visit: http://ift.tt/1ajReyV



Program for Fibonacci numbers | GeeksforGeeks

http://ift.tt/1iqWw5M



Program for Fibonacci numbers | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lOrBeG

via LifeLong Community

Compute the integer absolute value (abs) without branching | GeeksforGeeks unsigned int getAbs(int n...

Please Visit: http://ift.tt/1ajReyV



Compute the integer absolute value (abs) without branching | GeeksforGeeks

unsigned int getAbs(int n){ int const mask = n >> (sizeof(int) * CHAR_BIT - 1); return ((n + mask) ^ mask);}

http://ift.tt/1iegKzX

http://ift.tt/1iegIIk



Compute the integer absolute value (abs) without branching | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lNLNNU

via LifeLong Community

Add 1 to a given number | GeeksforGeeks Write a program to add one to a given number. You are not allowed...

Please Visit: http://ift.tt/1ajReyV



Add 1 to a given number | GeeksforGeeks

Write a program to add one to a given number. You are not allowed to use operators like ‘+’, ‘-’, ‘*’, ‘/’, ‘++’, ‘–’ …etc.

http://ift.tt/1iegIrO

http://ift.tt/1lNLNxh



Add 1 to a given number | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lNLNxk

via LifeLong Community

Trash Can of Code: Fast Multiplication and Division Another well known bitwise trick is that you can...

Please Visit: http://ift.tt/1ajReyV



Trash Can of Code: Fast Multiplication and Division

Another well known bitwise trick is that you can do multiplication and division by powers of two "2^n", with just simple shifts by "n".

http://ift.tt/1iegIbj

http://ift.tt/1iegIbn



Trash Can of Code: Fast Multiplication and Division







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lNLN0g

via LifeLong Community

Trash Can of Code: Fast Modulus Operation and Using Unsigned Ints as an Optimization http://cottonvi...

Please Visit: http://ift.tt/1ajReyV



Trash Can of Code: Fast Modulus Operation and Using Unsigned Ints as an Optimization

http://ift.tt/1iegH7n



Trash Can of Code: Fast Modulus Operation and Using Unsigned Ints as an Optimization







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lNLMJA

via LifeLong Community

HAKMEM Item 175 http://ift.tt/1uHrmaw

Please Visit: http://ift.tt/1ajReyV



HAKMEM Item 175

http://ift.tt/1uHrmaw



HAKMEM Item 175







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1uHrmHM

via LifeLong Community

Smallest of three integers without comparison operators | GeeksforGeeks Write a C program to find the...

Please Visit: http://ift.tt/1ajReyV



Smallest of three integers without comparison operators | GeeksforGeeks



Write a C program to find the smallest of three integers, without using any of the comparison operators.

http://ift.tt/1idj4rd

http://ift.tt/TbnkeM



Smallest of three integers without comparison operators | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1idj4Ht

via LifeLong Community

Compute the minimum or maximum of two integers without branching | GeeksforGeeks http://ift.tt/12zZ8j4...

Please Visit: http://ift.tt/1ajReyV



Compute the minimum or maximum of two integers without branching | GeeksforGeeks

http://ift.tt/1idj4ax



Compute the minimum or maximum of two integers without branching | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1idj2j3

via LifeLong Community

Ant: Compiling Using Specific JDK The Problem In some cases, when use ant to compile code, we may have...

Please Visit: http://ift.tt/1ajReyV



Ant: Compiling Using Specific JDK

The Problem In some cases, when use ant to compile code, we may have to use a specific JDK version which may be different than the default jdk in the system: for example, the project may use some jdk internal code which is not good, but sometimes we have to...



The Problem In some cases, when use ant to compile code, we may have to use a specific JDK version which may be different than the default jdk in the system: for example, the project may use some jdk internal code which is no...







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1nn6d2J

via LifeLong Community

Low Level Bit Hacks You Absolutely Must Know - good coders code, great reuse http://www.catonmat.net...

Please Visit: http://ift.tt/1ajReyV



Low Level Bit Hacks You Absolutely Must Know - good coders code, great reuse

http://ift.tt/16sFwQy



Low Level Bit Hacks You Absolutely Must Know - good coders code, great reuse







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1iJ9CXd

via LifeLong Community

Number of 1 bits | LeetCode Write a function that takes an unsigned integer and returns the number ...

Please Visit: http://ift.tt/1ajReyV



Number of 1 bits | LeetCode



Write a function that takes an unsigned integer and returns the number of ’1′ bits it has. For example, the 32-bit integer ’11′ has binary representation 00000000000000000000000000001011, so the function should return 3.

http://ift.tt/1iJ9Ehx

http://ift.tt/1spVNGr



Number of 1 bits | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1iJ9EhA

via LifeLong Community

Swap bits in a given number | GeeksforGeeks Given a number x and two positions (from right side) in...

Please Visit: http://ift.tt/1ajReyV



Swap bits in a given number | GeeksforGeeks



Given a number x and two positions (from right side) in binary representation of x, write a function that swaps n bits at given two positions and returns the result. It is also given that the two sets of bits do not overlap.

http://ift.tt/1spVN9F

http://ift.tt/1iJ9B5A



Swap bits in a given number | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1spVQ56

via LifeLong Community

Detect if two integers have opposite signs | GeeksforGeeks Given two signed integers, write a function...

Please Visit: http://ift.tt/1ajReyV



Detect if two integers have opposite signs | GeeksforGeeks



Given two signed integers, write a function that returns true if the signs of given integers are different, otherwise false. For example, the function should return true -1 and +100, and should return false for -100 and -200. The function should not use any of the arithmetic operators.

http://ift.tt/1l4CXjl

http://ift.tt/1iIKb85



Detect if two integers have opposite signs | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1l4CXjp

via LifeLong Community

Find the element that appears once | GeeksforGeeks Given an array where every element occurs three times...

Please Visit: http://ift.tt/1ajReyV



Find the element that appears once | GeeksforGeeks

Given an array where every element occurs three times, except one element which occurs only once. Find the element that occurs once. Expected time complexity is O(n) and O(1) extra space.

http://ift.tt/1iIK9Nz

http://ift.tt/1l4CZaZ



Find the element that appears once | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1iIKaRB

via LifeLong Community

Chain Matrix Multiplication Given a sequence of n matrices A1, A2, ... An, and their dimensions p0,...

Please Visit: http://ift.tt/1ajReyV



Chain Matrix Multiplication



Given a sequence of n matrices A1,

A2, ... An, and their

dimensions p0, p1, p2, ...,

pn, where where i = 1, 2, ..., n, matrix

Ai has dimension pi −

1 × pi, determine the order of multiplication that

minimizes the the number of scalar multiplications.

http://ift.tt/1l4CVYR

http://ift.tt/1l4CWf7



Chain Matrix Multiplication







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1l4CWfb

via LifeLong Community

Dynamic Programming | Set 7 (Coin Change) | GeeksforGeeks Given a value N, if we want to make change...

Please Visit: http://ift.tt/1ajReyV



Dynamic Programming | Set 7 (Coin Change) | GeeksforGeeks



Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, how many ways can we make the change? The order of coins doesn’t matter.

http://ift.tt/1phAVvC

http://ift.tt/1phAVvD



Dynamic Programming | Set 7 (Coin Change) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1phAVvF

via LifeLong Community

Coding Interview Questions: No. 26 - Minimal Number of Coins for Change Problem: Please implement a ...

Please Visit: http://ift.tt/1ajReyV



Coding Interview Questions: No. 26 - Minimal Number of Coins for Change

Problem: Please implement a function which gets the minimal number of coins, whose value is v1, v2, …, vn, to make change for an amount of money with value t. Any coin with value vi may duplicate for any times to make change.

http://ift.tt/1pk8TkX

http://ift.tt/1phAVvm



Coding Interview Questions: No. 26 - Minimal Number of Coins for Change







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1phAXUj

via LifeLong Community

Edit Distance in Java In computer science, edit distance is a way of quantifying how dissimilar two...

Please Visit: http://ift.tt/1ajReyV



Edit Distance in Java



In computer science, edit distance is a way of quantifying how dissimilar two strings (e.g., words) are to one another by counting the minimum number of operations required to transform one string into the other.

http://ift.tt/1phAXDC

http://ift.tt/1phAXDE



Edit Distance in Java







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pk8RJH

via LifeLong Community

Dynamic Programming | Set 6 (Min Cost Path) | GeeksforGeeks Given a cost matrix cost[][] and a position...

Please Visit: http://ift.tt/1ajReyV



Dynamic Programming | Set 6 (Min Cost Path) | GeeksforGeeks

Given a cost matrix cost[][] and a position (m, n) in cost[][], write a function that returns cost of minimum cost path to reach (m, n) from (0, 0). Each cell of the matrix represents a cost to traverse through that cell. Total cost of a path to reach (m, n) is sum of all the costs on that path (including both source and destination). You can only traverse down, right and diagonally lower cells from a given cell, i.e., from a given cell (i, j), cells (i+1, j), (i, j+1) and (i+1, j+1) can be traversed

http://ift.tt/UcJJJy

http://ift.tt/1r9rUG8



Dynamic Programming | Set 6 (Min Cost Path) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/UcJLB9

via LifeLong Community

Dynamic Programming | Set 4 (Longest Common Subsequence) | GeeksforGeeks LCS Problem Statement: Given...

Please Visit: http://ift.tt/1ajReyV



Dynamic Programming | Set 4 (Longest Common Subsequence) | GeeksforGeeks

LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous.

http://ift.tt/1kHzAhW

http://ift.tt/1r9rWOg



Dynamic Programming | Set 4 (Longest Common Subsequence) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/UcJLky

via LifeLong Community

Dynamic Programming | Set 3 (Longest Increasing Subsequence) | GeeksforGeeks The longest Increasing...

Please Visit: http://ift.tt/1ajReyV



Dynamic Programming | Set 3 (Longest Increasing Subsequence) | GeeksforGeeks



The longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order. For example, length of LIS for { 10, 22, 9, 33, 21, 50, 41, 60, 80 } is 6 and LIS is {10, 22, 33, 50, 60, 80}.

http://ift.tt/UcJJsY

http://ift.tt/1r9rWxM



Dynamic Programming | Set 3 (Longest Increasing Subsequence) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1r9rU9a

via LifeLong Community

Dynamic Programming | Set 1 (Overlapping Subproblems Property) | GeeksforGeeks Dynamic Programming is...

Please Visit: http://ift.tt/1ajReyV



Dynamic Programming | Set 1 (Overlapping Subproblems Property) | GeeksforGeeks

Dynamic Programming is an algorithmic paradigm that solves a given complex problem by breaking it into subproblems and stores the results of subproblems to avoid computing the same results again.

http://ift.tt/1pgLmj1

http://ift.tt/1pgLoaB



Dynamic Programming | Set 1 (Overlapping Subproblems Property) | GeeksforGeeks







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1img1g0

via LifeLong Community

Tutorial for Dynamic Programming | CodeChef http://ift.tt/1pgLoau...

Please Visit: http://ift.tt/1ajReyV



Tutorial for Dynamic Programming | CodeChef

http://ift.tt/1pgLoau



Tutorial for Dynamic Programming | CodeChef







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1img0Zy

via LifeLong Community

Puzzles http://ift.tt/1img3o0

Please Visit: http://ift.tt/1ajReyV






Puzzles







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pgLnU2

via LifeLong Community

Get maximum sum from coins in a line | PROGRAMMING INTERVIEWS Question: There are n coins in a line...

Please Visit: http://ift.tt/1ajReyV



Get maximum sum from coins in a line | PROGRAMMING INTERVIEWS

Question: There are n coins in a line. Two players take turns to take a coin from one of the ends of the line until there are no more coins left. The player with the larger amount of money wins. Assume that you go first, describe an algorithm to compute the maximum amount of money you can win.

http://ift.tt/1img0Zm

http://ift.tt/1pgLnDE



Get maximum sum from coins in a line | PROGRAMMING INTERVIEWS







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1img37v

via LifeLong Community

Reshared post from Wes Warner:

Please Visit: http://ift.tt/1ajReyV






Original Post from Wes Warner:


Some food for thought on algorithms and computational thinking



#acara #digital #technologies








Maybe a little more than 10







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lDUqdG

via LifeLong Community

Coins in a Line | LeetCode There are n coins in a line. (Assume n is even). Two players take turns ...

Please Visit: http://ift.tt/1ajReyV



Coins in a Line | LeetCode



There are n coins in a line. (Assume n is even). Two players take turns to take a coin from one of the ends of the line until there are no more coins left. The player with the larger amount of money wins.Would you rather go first or second? Does it matter?Assume that you go first, describe an algorithm to compute the maximum amount of money you can win.

http://ift.tt/1phEaow

http://ift.tt/1phEaVu



Coins in a Line | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1iGPh4z

via LifeLong Community

Learning From Code: Fast Fail Iterators, page 1 of 2 What is a mysterious field called modCount doing...

Please Visit: http://ift.tt/1ajReyV



Learning From Code: Fast Fail Iterators, page 1 of 2

What is a mysterious field called modCount doing in the List Iterator

classes? How can we efficiently handle iterating over collections when another

thread may be updating the collection at the same time?

http://ift.tt/1r5qpIQ

http://ift.tt/1r5qpIS



Learning From Code: Fast Fail Iterators, page 1 of 2







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1r5qpIU

via LifeLong Community

What is Iterator and ListIterator in Java Program with Example - Tutorial Code Sample http://javarev...

Please Visit: http://ift.tt/1ajReyV



What is Iterator and ListIterator in Java Program with Example - Tutorial Code Sample

http://ift.tt/1qri6cR



What is Iterator and ListIterator in Java Program with Example - Tutorial Code Sample







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1r5qn3R

via LifeLong Community

Learning From Code: Fast Random Access, page 1 of 2 http://ift.tt/1vOy6WJ...

Please Visit: http://ift.tt/1ajReyV



Learning From Code: Fast Random Access, page 1 of 2

http://ift.tt/1pfCZGc



Learning From Code: Fast Random Access, page 1 of 2







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1vOy6WL

via LifeLong Community

Nuances of the Java 5.0 for-each Loop | Java.net http://ift.tt/1pfCZpQ...

Please Visit: http://ift.tt/1ajReyV



Nuances of the Java 5.0 for-each Loop | Java.net

http://ift.tt/1vOy6Gi



Nuances of the Java 5.0 for-each Loop | Java.net







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pfCXxW

via LifeLong Community

What is EnumMap in Java – Example Tutorial http://ift.tt/1iiCpXz...

Please Visit: http://ift.tt/1ajReyV



What is EnumMap in Java – Example Tutorial

http://ift.tt/1pene0k



What is EnumMap in Java – Example Tutorial







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1penfRZ

via LifeLong Community

Difference between RegularEnumSet and JumboEnumSet in Java | Java67 http://ift.tt/1lzW4Ni...

Please Visit: http://ift.tt/1ajReyV



Difference between RegularEnumSet and JumboEnumSet in Java | Java67

http://ift.tt/1ygeMUs



Difference between RegularEnumSet and JumboEnumSet in Java | Java67







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lzW2Fj

via LifeLong Community

How to use EnumSet in Java with Example http://ift.tt/1oCrAT4...

Please Visit: http://ift.tt/1ajReyV



How to use EnumSet in Java with Example

http://ift.tt/1dHQ1cR



How to use EnumSet in Java with Example







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1oCrD1k

via LifeLong Community

security - Finding the physical local path associated with a Share UNC folder - Super User Open a command...

Please Visit: http://ift.tt/1ajReyV



security - Finding the physical local path associated with a Share UNC folder - Super User



Open a command prompt window and type net share, then hit Enter.

http://ift.tt/1r3yDkU

http://ift.tt/1oCrzi2



security - Finding the physical local path associated with a Share UNC folder - Super User







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1r3yCgG

via LifeLong Community

Why Enum Singleton are better in Java http://ift.tt/1nbYjI4...

Please Visit: http://ift.tt/1ajReyV



Why Enum Singleton are better in Java

http://ift.tt/1lBFHUQ



Why Enum Singleton are better in Java







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lBFHUR

via LifeLong Community

How to determine if a point is inside a rectangle? | LeetCode Given a 2D point and a rectangle, determine...

Please Visit: http://ift.tt/1ajReyV



How to determine if a point is inside a rectangle? | LeetCode

Given a 2D point and a rectangle, determine if the point is inside the rectangle.

http://ift.tt/1nbYiUO

http://ift.tt/1lBFHEk



How to determine if a point is inside a rectangle? | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1nbYjb2

via LifeLong Community

Determine If Two Rectangles Overlap | LeetCode Given two axis-aligned rectangles A and B. Write a function...

Please Visit: http://ift.tt/1ajReyV



Determine If Two Rectangles Overlap | LeetCode

Given two axis-aligned rectangles A and B. Write a function to determine if the two rectangles overlap.

http://ift.tt/1pd7pXI

http://ift.tt/1lP2DAy



Determine If Two Rectangles Overlap | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pd7nPE

via LifeLong Community

Lowest Common Ancestor of a Binary Search Tree (BST) | LeetCode Given a binary search tree (BST), find...

Please Visit: http://ift.tt/1ajReyV



Lowest Common Ancestor of a Binary Search Tree (BST) | LeetCode

Given a binary search tree (BST), find the lowest common ancestor of two given nodes in the BST.

http://ift.tt/1pd7n2b

http://ift.tt/1lP2FIy



Lowest Common Ancestor of a Binary Search Tree (BST) | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pd7nPx

via LifeLong Community

Lowest Common Ancestor of a Binary Tree Part II | LeetCode Given a binary tree, find the lowest common...

Please Visit: http://ift.tt/1ajReyV



Lowest Common Ancestor of a Binary Tree Part II | LeetCode



Given a binary tree, find the lowest common ancestor of two given nodes in the tree. Each node contains a parent pointer which links to its parent.

http://ift.tt/1pd7mLB

http://ift.tt/1lP2D3x



Lowest Common Ancestor of a Binary Tree Part II | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pd7mLH

via LifeLong Community

Lowest Common Ancestor of a Binary Tree Part I | LeetCode Given a binary tree, find the lowest common...

Please Visit: http://ift.tt/1ajReyV



Lowest Common Ancestor of a Binary Tree Part I | LeetCode



Given a binary tree, find the lowest common ancestor of two given nodes in the tree.

http://ift.tt/1pd7kmZ

http://ift.tt/1lP2EEu



Lowest Common Ancestor of a Binary Tree Part I | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pd7kn0

via LifeLong Community

Reverse Bits | LeetCode There are several methods of reversing the bits of an unsigned integer. Here...

Please Visit: http://ift.tt/1ajReyV



Reverse Bits | LeetCode



There are several methods of reversing the bits of an unsigned integer. Here, we devise an algorithm using the XOR swap trick, and then optimize it using a divide and conquer methodology.

http://ift.tt/1lP2BZl

http://ift.tt/1pd7kmP



Reverse Bits | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lP2BZr

via LifeLong Community

XOR swap algorithm - Wikipedia, the free encyclopedia void xorSwap (int *x, int *y) { if (x != y) { ...

Please Visit: http://ift.tt/1ajReyV



XOR swap algorithm - Wikipedia, the free encyclopedia

void xorSwap (int *x, int *y) {

if (x != y) {

*x ^= *y;

*y ^= *x;

*x ^= *y;

}

}

http://ift.tt/1pd7k6h

http://ift.tt/1lP2Bsm



XOR swap algorithm - Wikipedia, the free encyclopedia







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pd7k6k

via LifeLong Community

Insert into a Cyclic Sorted List | LeetCode Given a node from a cyclic linked list which has been sorted...

Please Visit: http://ift.tt/1ajReyV



Insert into a Cyclic Sorted List | LeetCode



Given a node from a cyclic linked list which has been sorted, write a function to insert a value into the list such that it remains a cyclic sorted list. The given node can be any single node in the list.

http://ift.tt/1lP2BbL

http://ift.tt/1lP2z3F



Insert into a Cyclic Sorted List | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pd7jzx

via LifeLong Community

Tristan's Collection of Interview Questions: The Longest Palindrome Substring (Manacher's algorithm)...

Please Visit: http://ift.tt/1ajReyV



Tristan's Collection of Interview Questions: The Longest Palindrome Substring (Manacher's algorithm)

Problem: Given a string, find a longest palindrome (Link->http://ift.tt/1lP2xZQ) substring.

Solution: We can use general suffix tree that stores the original string and its reverse, which is an O(N) algorithm. However, here we give a better one with less space overhead while still O(N) complexity. This algorithm is called Manacher's algorithm (Link->http://ift.tt/1pd7lau) . If we check a string from left to right, we can leverage the palindrome check we did previously. This is from the symmetry of palindrome.

http://ift.tt/1lP2yg8

http://ift.tt/1pd7laz



Tristan's Collection of Interview Questions: The Longest Palindrome Substring (Manacher's algorithm)







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pd7iLU

via LifeLong Community

Clone Graph Part I | LeetCode Clone a graph. Input is a Node pointer. Return the Node pointer of the...

Please Visit: http://ift.tt/1ajReyV



Clone Graph Part I | LeetCode

Clone a graph. Input is a Node pointer. Return the Node pointer of the cloned graph

http://ift.tt/U6FXkO

http://ift.tt/1r1EVRT



Clone Graph Part I | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/U6FXkV

via LifeLong Community

Convert Sorted List to Balanced Binary Search Tree (BST) | LeetCode Given a singly linked list where...

Please Visit: http://ift.tt/1ajReyV



Convert Sorted List to Balanced Binary Search Tree (BST) | LeetCode



Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.

http://ift.tt/U6FX4c

http://ift.tt/1r1ESFZ



Convert Sorted List to Balanced Binary Search Tree (BST) | LeetCode







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/U6FX4h

via LifeLong Community

Yu's Coding Garden : leetcode Question 24: Convert Sorted List to Binary Search Tree Given a singly ...

Please Visit: http://ift.tt/1ajReyV



Yu's Coding Garden : leetcode Question 24: Convert Sorted List to Binary Search Tree

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.

http://ift.tt/U6FT4F

http://ift.tt/1r1ES8G



Yu's Coding Garden : leetcode Question 24: Convert Sorted List to Binary Search Tree







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/U6FUpd

via LifeLong Community

Yu's Coding Garden : leetcode Question 55: Minimum Depth of Binary Tree Given a binary tree, find its...

Please Visit: http://ift.tt/1ajReyV



Yu's Coding Garden : leetcode Question 55: Minimum Depth of Binary Tree

Given a binary tree, find its minimum depth.

The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.

http://ift.tt/1r1EOG0

http://ift.tt/1r1ERBK



Yu's Coding Garden : leetcode Question 55: Minimum Depth of Binary Tree







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/U6FU8D

via LifeLong Community

Yu's Coding Garden : leetcode Question 67: Path Sum II Given a binary tree and a sum, find all root-...

Please Visit: http://ift.tt/1ajReyV



Yu's Coding Garden : leetcode Question 67: Path Sum II

Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.

http://ift.tt/1r1ERla

http://ift.tt/U6FSxF



Yu's Coding Garden : leetcode Question 67: Path Sum II







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1r1EOpy

via LifeLong Community

Yu's Coding Garden : leetcode Question 66: Path Sum I Given a binary tree and a sum, determine if the...

Please Visit: http://ift.tt/1ajReyV



Yu's Coding Garden : leetcode Question 66: Path Sum I

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.

http://ift.tt/U6FSxv

http://ift.tt/1r1ER4B



Yu's Coding Garden : leetcode Question 66: Path Sum I







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/U6FTBM

via LifeLong Community

LightOJ 1076 Get the Containers 二分答案 - Polo's Blog of CSDN - 博客频道 - CSDN.NET http://ift.tt/1r1ENSp...

Please Visit: http://ift.tt/1ajReyV



LightOJ 1076 Get the Containers 二分答案 - Polo's Blog of CSDN - 博客频道 - CSDN.NET

http://ift.tt/1mVs6Il



LightOJ 1076 Get the Containers 二分答案 - Polo's Blog of CSDN - 博客频道 - CSDN.NET







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1r1EQxP

via LifeLong Community

水中的鱼: [LeetCode] Validate Binary Search Tree 解题报告 http://ift.tt/1oz1IYf...

Please Visit: http://ift.tt/1ajReyV



水中的鱼: [LeetCode] Validate Binary Search Tree 解题报告

http://ift.tt/1oz1KPX



水中的鱼: [LeetCode] Validate Binary Search Tree 解题报告







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1vxAdy0

via LifeLong Community

Yu's Coding Garden : leetcode Question 109: Symmetric Tree http://ift.tt/1oz1Kzq...

Please Visit: http://ift.tt/1ajReyV



Yu's Coding Garden : leetcode Question 109: Symmetric Tree

http://ift.tt/1oz1IHR



Yu's Coding Garden : leetcode Question 109: Symmetric Tree







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1vxAbGf

via LifeLong Community

leetcode Single Number II - 位运算处理数组中的数 - 代金桥 - 博客园 http://ift.tt/1oz1IHz

Please Visit: http://ift.tt/1ajReyV



leetcode Single Number II - 位运算处理数组中的数 - 代金桥 - 博客园

http://ift.tt/1oz1IHz



leetcode Single Number II - 位运算处理数组中的数 - 代金桥 - 博客园







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1oz1Kzc

via LifeLong Community

LeetCode-Single Number II[位运算] | Acm之家 iven an array of integers, every element appears three times...

Please Visit: http://ift.tt/1ajReyV



LeetCode-Single Number II[位运算] | Acm之家



iven an array of integers, every element appears three times except for one. Find that single one.

http://ift.tt/1oz1IaI

http://ift.tt/1oz1Ir4



LeetCode-Single Number II[位运算] | Acm之家







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1oz1Ir6

via LifeLong Community

My Leetcode: Partition List (Java) Given a linked list and a value x, partition it such that all nodes...

Please Visit: http://ift.tt/1ajReyV



My Leetcode: Partition List (Java)

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.

You should preserve the original relative order of the nodes in each of the two partitions.

http://ift.tt/1q5P00x

http://ift.tt/1q5P00z



My Leetcode: Partition List (Java)







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1q5P0gN

via LifeLong Community

LeetCode – Merge k Sorted Lists (Java) Merge k sorted linked lists and return it as one sorted list...

Please Visit: http://ift.tt/1ajReyV



LeetCode – Merge k Sorted Lists (Java)



Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.

http://ift.tt/1lKwlXw

http://ift.tt/1lKwmdM



LeetCode – Merge k Sorted Lists (Java)







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lKwpq1

via LifeLong Community

Variable argument or Varargs methods from Java 5 with Example - Programming Tutorial 1) Every call to...

Please Visit: http://ift.tt/1ajReyV



Variable argument or Varargs methods from Java 5 with Example - Programming Tutorial

1) Every call to varargs method require an anonymous array (Link->http://ift.tt/1q5OZtx) to be created and initialized which could affect performance in time critical application. There is an alternative of varargs method to achieve better performance. suppose you have a variable argument method sum(int... num) and its called with 2 parameters on 90% of time

http://ift.tt/1q5P2oU

http://ift.tt/1q5OZJL



Variable argument or Varargs methods from Java 5 with Example - Programming Tutorial







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1q5P2oV

via LifeLong Community

Why doesn't Java allow generic subclasses of Throwable? - Stack Overflow As mark said, the types are...

Please Visit: http://ift.tt/1ajReyV



Why doesn't Java allow generic subclasses of Throwable? - Stack Overflow



As mark said, the types are not reifiable, which is a problem in the following case:

try {

doSomeStuff();

} catch (SomeException<Integer> e) {

// ignore that

} catch (SomeException<String> e) {

crashAndBurn()

}

Both SomeException<Integer> and SomeException<String> are erased to the same type, there is no way for the JVM to distinguish the exception instances, and therefore no way to tell which catch block should be executed.

http://ift.tt/1lJD8QY

http://ift.tt/1lJD8QZ



Why doesn't Java allow generic subclasses of Throwable? - Stack Overflow







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pa5u6j

via LifeLong Community

Why don't Java Generics support primitive types? - Stack Overflow Generics in Java are an entirely ...

Please Visit: http://ift.tt/1ajReyV



Why don't Java Generics support primitive types? - Stack Overflow



Generics in Java are an entirely compile-time construct - the compiler turns all generic uses into casts to the right type. This is to maintain backwards compatibility with previous JVM runtimes.

This:

List<ClassA> list = new ArrayList<ClassA>();

list.add(new ClassA());

ClassA a = list.get(0);

gets turned into (roughly):

List list = new ArrayList();

list.add(new ClassA());

ClassA a = (ClassA)list.get(0);

So, anything that is used as generics has to be convertable to Object (in this example get(0) returns an Object), and the primitive types aren't. So they can't be used in generics.

C# is a separate matter - generics are implemented directly as part of the runtime, so primitive types can be used - the CLR generates new versions of generic classes for primitives and structs as they are used. The only disadvantage is (until .NET 4) no generic covariance or contravariance was allowed, unlike Java (see the super and extends keywords in generic definitions)

http://ift.tt/MVfgfM

http://ift.tt/1pa5raF



Why don't Java Generics support primitive types? - Stack Overflow







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pa5raH

via LifeLong Community

Restrictions on Generics (The Java™ Tutorials > Learning the Java Language > Generics (Updated)) http...

Please Visit: http://ift.tt/1ajReyV



Restrictions on Generics (The Java™ Tutorials > Learning the Java Language > Generics (Updated))

http://ift.tt/1lJD8ke



Restrictions on Generics (The Java™ Tutorials > Learning the Java Language > Generics (Updated))







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lJD8Au

via LifeLong Community

Java Generics: What Beginners Find Surprising | OneWebSQL http://ift.tt/1lJD6st...

Please Visit: http://ift.tt/1ajReyV



Java Generics: What Beginners Find Surprising | OneWebSQL

http://ift.tt/1pa5qU6



Java Generics: What Beginners Find Surprising | OneWebSQL







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1pa5ovj

via LifeLong Community

Java Generics: The Difference between Java Arrays and Generic Lists | OneWebSQL http://onewebsql.com...

Please Visit: http://ift.tt/1ajReyV



Java Generics: The Difference between Java Arrays and Generic Lists | OneWebSQL

http://ift.tt/SNS5Ga



Java Generics: The Difference between Java Arrays and Generic Lists | OneWebSQL







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/SNS5Gc

via LifeLong Community

Java Generics: extends, super and wildcards explained | OneWebSQL http://ift.tt/U366RF...

Please Visit: http://ift.tt/1ajReyV



Java Generics: extends, super and wildcards explained | OneWebSQL

http://ift.tt/U366RH



Java Generics: extends, super and wildcards explained | OneWebSQL







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/SNS5G6

via LifeLong Community

LeetCode – Palindrome Partitioning (Java) Given a string s, partition s such that every substring of...

Please Visit: http://ift.tt/1ajReyV



LeetCode – Palindrome Partitioning (Java)



Given a string s, partition s such that every substring of the partition is a palindrome.

http://ift.tt/U364Jx

http://ift.tt/SNS5pK



LeetCode – Palindrome Partitioning (Java)







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/U364Jz

via LifeLong Community

Simplest way to print an array in Java - Stack Overflow System.out.println(Arrays.toString(array));...

Please Visit: http://ift.tt/1ajReyV



Simplest way to print an array in Java - Stack Overflow



System.out.println(Arrays.toString(array));

or if your array contains other arrays as elements:

System.out.println(Arrays.deepToString(array));

http://ift.tt/U364Jl

http://ift.tt/SNS5pE



Simplest way to print an array in Java - Stack Overflow







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/U366Ru

via LifeLong Community

3 Ways to Print an Array in Java - wikiHow http://ift.tt/U366B1

Please Visit: http://ift.tt/1ajReyV



3 Ways to Print an Array in Java - wikiHow

http://ift.tt/U366B1



3 Ways to Print an Array in Java - wikiHow







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/SNS3hy

via LifeLong Community

Algo Ramblings: Longest substring with 2 unique characters. Q: Find the longest substring with at most...

Please Visit: http://ift.tt/1ajReyV



Algo Ramblings: Longest substring with 2 unique characters.



Q: Find the longest substring with at most two unique characters(ASCII) in a given string .

http://ift.tt/SNS58Y

http://ift.tt/U366AW



Algo Ramblings: Longest substring with 2 unique characters.







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/SNS3hu

via LifeLong Community

LeetCode – Longest Substring Without Repeating Characters (Java) Given a string, find the length of...

Please Visit: http://ift.tt/1ajReyV



LeetCode – Longest Substring Without Repeating Characters (Java)



Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the length of 1.

http://ift.tt/1owwsZO

http://ift.tt/1vtbzyA



LeetCode – Longest Substring Without Repeating Characters (Java)







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1owwsZS

via LifeLong Community