How to efficiently implement k Queues in a single array? - GeeksforGeeks Create a data structure kQueues...

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



How to efficiently implement k Queues in a single array? - GeeksforGeeks



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

enqueue(int x, int qn) –> adds x to queue number ‘qn’ where qn is from 0 to k-1

dequeue(int qn) –> deletes an element from queue number ‘qn’ where qn is from 0 to k-1

http://ift.tt/1r7ENUB

http://ift.tt/1vhW65x



How to efficiently implement k Queues in a single array? - GeeksforGeeks







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

via LifeLong Community

Analysis of Algorithm | Set 5 (Amortized Analysis Introduction) - GeeksforGeeks Amortized Analysis ...

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



Analysis of Algorithm | Set 5 (Amortized Analysis Introduction) - GeeksforGeeks



Amortized Analysis (Link->http://ift.tt/1qIhw5l) is used for algorithms where an occasional operation is very slow, but most of the other operations are faster. In Amortized Analysis, we analyze a sequence of operations and guarantee a worst case average time which is lower than the worst case time of a particular expensive operation.

The example data structures whose operations are analyzed using Amortized Analysis are Hash Tables, Disjoint Sets and Splay Trees.

http://ift.tt/1uC6LFw

http://ift.tt/1qIhw5r



Analysis of Algorithm | Set 5 (Amortized Analysis Introduction) - GeeksforGeeks







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

via LifeLong Community

Mobile Numeric Keypad Problem - GeeksforGeeks Given the mobile numeric keypad. You can only press buttons...

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



Mobile Numeric Keypad Problem - GeeksforGeeks

Given the mobile numeric keypad. You can only press buttons that are up, left, right or down to the current button. You are not allowed to press bottom row corner buttons (i.e. * and # ).

Given a number N, find out the number of possible numbers of given length.

http://ift.tt/1n5Y73P

http://ift.tt/1rtNiIv



Mobile Numeric Keypad Problem - GeeksforGeeks







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

via LifeLong Community

One dimensional binary searching Given a list of N (unique) points on a line, locate all the points ...

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



One dimensional binary searching

Given a list of N (unique) points on a line, locate all the points in a

given interval on that line.

Input: {p1, p2, p3, p4, ... pN}, [x, x']

Output: {pi | x <= pi <= x'}

http://ift.tt/1DIiDwm

http://ift.tt/1Cvv8d6



One dimensional binary searching







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

via LifeLong Community

Interval Tree - GeeksforGeeks Consider a situation where we have a set of intervals and we need following...

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



Interval Tree - GeeksforGeeks

Consider a situation where we have a set of intervals and we need following operations to be implemented efficiently.

1) Add an interval

2) Remove an interval

3) Given an interval x, find if x overlaps with any of the existing intervals.

http://ift.tt/1l2mNaR

http://ift.tt/1Cvv8d6



Interval Tree - GeeksforGeeks







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

via LifeLong Community

Idle Process: Finding Overlapping Rectangles in a given set of Axis aligned rectagles Describe an algorithm...

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



Idle Process: Finding Overlapping Rectangles in a given set of Axis aligned rectagles

Describe an algorithm that takes an unsorted array of axis-aligned rectangles and returns any pair of rectangles that overlaps, if there is such a pair. Axis-aligned means that all the rectangle sides are either parallel or perpendicular to the x- and y-axis. You can assume that each rectangle object has two variables in it: the x-y coordinates of the upper-left corner and the bottom-right corner.

http://ift.tt/YnBETC

http://ift.tt/1DG5qnA



Idle Process: Finding Overlapping Rectangles in a given set of Axis aligned rectagles







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

via LifeLong Community

The Huffington Post: How Your Comfort Zone Is Sabotaging Your Success. http://ift.tt/1k7B1Xb...

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



The Huffington Post: How Your Comfort Zone Is Sabotaging Your Success. http://ift.tt/ZYrxX2



Image Credit: Monisha Rajasekaran Despite what you were taught growing up, being comfortable is bad. Many people envision a lifestyle where they can achieve success without having to step outside of their comfort zone. This is delusional thinking....







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

via LifeLong Community

No public posts available.

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



Jeffery yuan does not share any public posts. Visit the Google+-Page





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

via LifeLong Community

No public posts available.

Please Visit: http://lifelongprogrammer.blogspot.com



Jeffery yuan does not share any public posts. Visit the Google+-Page





from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com https://plus.google.com/+JefferyYuanLifeLongProgrammer

via LifeLong Community

Print All Combinations of a Number as a Sum of Candidate Numbers | LeetCode Given a target number, ...

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



Print All Combinations of a Number as a Sum of Candidate Numbers | LeetCode



Given a target number, and a series of candidate numbers, print out all combinations, so that the sum of candidate numbers equals to the target.



Here order is not important, so don’t print the duplicated combination.

e.g. target is 7, candidate is 2,3,6,7

output should be 7 and 3+2+2 (but not print 2+3+2, 2+2+3)

http://ift.tt/YeYIE7

http://ift.tt/ZTAwJ4



Print All Combinations of a Number as a Sum of Candidate Numbers | LeetCode







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

via LifeLong Community

Excel Sheet Row Numbers | LeetCode Given the sequence S1 = {a,b,c,d,…,x,y,z,aa,ab,ac…. } and given that...

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



Excel Sheet Row Numbers | LeetCode

Given the sequence S1 = {a,b,c,d,…,x,y,z,aa,ab,ac…. } and given that this sequence corresponds (term for term) to the sequence S2 = {0,1,2,3,….}. Write code to convert an element of S2 to the corresponding element of S1.

http://ift.tt/1Bdwcjg

http://ift.tt/ZTAwJ4



Excel Sheet Row Numbers | LeetCode







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

via LifeLong Community

How to Pretty Print a Binary Tree | LeetCode Have you ever thought of pretty-printing a binary tree?...

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



How to Pretty Print a Binary Tree | LeetCode

Have you ever thought of pretty-printing a binary tree?

http://ift.tt/1BdwaIb

http://ift.tt/ZTAyAw



How to Pretty Print a Binary Tree | LeetCode







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

via LifeLong Community

Binary Tree Level-Order Traversal Using Depth First Search (DFS) | LeetCode Given a binary tree, print...

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



Binary Tree Level-Order Traversal Using Depth First Search (DFS) | LeetCode

Given a binary tree, print out the tree in level order (ie, from left to right, level by level). Output a newline after the end of each level. Breadth First Search (BFS) is not allowed.

http://ift.tt/1Bc7bVw

http://ift.tt/ZRL4ID



Binary Tree Level-Order Traversal Using Depth First Search (DFS) | LeetCode







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

via LifeLong Community

25.09.2014 14:07

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





Want to avoid giving the impression you lack confidence and authority? Avoid these words







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

via LifeLong Community

The Guerrilla Guide to Interviewing (version 3.0) - Joel on Software Here’s a typical plan for interviewing...

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



The Guerrilla Guide to Interviewing (version 3.0) - Joel on Software



Here’s a typical plan for interviewing a programmer:

Introduction

Question about recent project candidate worked on

Easy Programming Question

Pointer/Recursion Question

Are you satisfied?

Do you have any questions?

http://ift.tt/s1JgPw

http://ift.tt/YblxJ1



The Guerrilla Guide to Interviewing (version 3.0) - Joel on Software







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

via LifeLong Community

Reshared post from Elizabeth Percy:

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






Original Post from Elizabeth Percy:


She may be young but good thing too this girl has a future and she is so right






Emma Watson UN speech







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

via LifeLong Community

String Reorder Distance Apart | LeetCode Given a string of lowercase characters, reorder them such ...

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



String Reorder Distance Apart | LeetCode



Given a string of lowercase characters, reorder them such that the same characters are at least distance d from each other.

Input: { a, b, b }, distance = 2

Output: { b, a, b }

http://ift.tt/ZOGBq4

http://ift.tt/ZOGE53



String Reorder Distance Apart | LeetCode







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

via LifeLong Community

Saving a Binary Search Tree to a File | LeetCode Describe an algorithm to save a Binary Search Tree ...

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



Saving a Binary Search Tree to a File | LeetCode

Describe an algorithm to save a Binary Search Tree (BST) to a file in terms of run-time and disk space complexity. You must be able to restore to the exact original BST using the saved format.

http://ift.tt/1CkXEhj

http://ift.tt/ZOGAT1



Saving a Binary Search Tree to a File | LeetCode







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

via LifeLong Community

Serialization/Deserialization of a Binary Tree | LeetCode Design an algorithm and write code to serialize...

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



Serialization/Deserialization of a Binary Tree | LeetCode

Design an algorithm and write code to serialize and deserialize a binary tree. Writing the tree to a file is called ‘serialization’ and reading back from the file to reconstruct the exact same binary tree is ‘deserialization’.

http://ift.tt/1CkXDKo

http://ift.tt/ZOGydG



Serialization/Deserialization of a Binary Tree | LeetCode







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

via LifeLong Community

Pattern Searching | Set 6 (Efficient Construction of Finite Automata) - GeeksforGeeks Algorithm: 1) ...

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



Pattern Searching | Set 6 (Efficient Construction of Finite Automata) - GeeksforGeeks

Algorithm:

1) Fill the first row. All entries in first row are always 0 except the entry for pat[0] character. For pat[0] character, we always need to go to state 1.

2) Initialize lps as 0. lps for the first index is always 0.

3) Do following for rows at index i = 1 to M. (M is the length of the pattern)

…..a) Copy the entries from the row at index equal to lps.

…..b) Update the entry for pat[i] character to i+1.

…..c) Update lps “lps = TF[lps][pat[i]]” where TF is the 2D array which is being constructed.

http://ift.tt/Y6XfQl

http://ift.tt/1mWwhqB



Pattern Searching | Set 6 (Efficient Construction of Finite Automata) - GeeksforGeeks







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

via LifeLong Community

Searching for Patterns | Set 5 (Finite Automata) - GeeksforGeeks http://ift.tt/Y6Xefg...

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



Searching for Patterns | Set 5 (Finite Automata) - GeeksforGeeks

http://ift.tt/1m1ORv7



Searching for Patterns | Set 5 (Finite Automata) - GeeksforGeeks







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

via LifeLong Community

The art of simplicity: Load testing with Fiddler Instead we choose Fiddler (Link->http://bartwullem...

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



The art of simplicity: Load testing with Fiddler



Instead we choose Fiddler (Link->http://ift.tt/1mV6M90) plug-in for easy load testing of web applications.

StresStimulus plays back HTTP requests recorded in Fiddler to create high concurrency workload on web applications. You can configure virtual users, think time, and number of test iterations or test duration.

http://ift.tt/Y8TJoI

http://ift.tt/1mV6Lly



The art of simplicity: Load testing with Fiddler







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

via LifeLong Community

24.09.2014 12:53

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





Though you may not realize it, you use critical thinking skills ever day. Join us as we talk about critical thinking and how it applies to your every day lif...







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

via LifeLong Community

Mint: Apple’s iOS software update causing frequent mobile app crashes: report. http://ift.tt/1eUavJA...

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



Mint: Apple’s iOS software update causing frequent mobile app crashes: report. http://ift.tt/1vb1ruw



The iOS 8 OS causes apps to crash about 3.3% of the time, or 67% more than last year’s version, according to a report by Crittercism Inc.







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

via LifeLong Community

Evening Standard: Bending iPhone 6 Plus: Users say Apple's new device bends in pockets. http://google.com...

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



Evening Standard: Bending iPhone 6 Plus: Users say Apple's new device bends in pockets. http://ift.tt/1mRDWGL



Owners of the new iPhone 6 Plus have complained that it bends in their pockets.







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

via LifeLong Community

Searching for Patterns | Set 2 (KMP Algorithm) - GeeksforGeeks Given a text txt[0..n-1] and a pattern...

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



Searching for Patterns | Set 2 (KMP Algorithm) - GeeksforGeeks

Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m.

http://ift.tt/1fb3Taj

http://ift.tt/1mOy9l6



Searching for Patterns | Set 2 (KMP Algorithm) - GeeksforGeeks







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

via LifeLong Community

http://ift.tt/1mOy5SD

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






http://ift.tt/1mOy5SD







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

via LifeLong Community

Knuth-Morris-Pratt algorithm http://ift.tt/1jTDKj5

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



Knuth-Morris-Pratt algorithm

http://ift.tt/1jTDKj5



Knuth-Morris-Pratt algorithm







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

via LifeLong Community

Longest Subarray with Sum Divisible by K | Algorithms Notes Given an integer array A of length n and...

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



Longest Subarray with Sum Divisible by K | Algorithms Notes



Given an integer array A of length n and an integer K, design an O(n lg n) algorithm to find the longest subarray, subject to the sum of the subarray is divisible by K.

Solution:

Let S[i] be the sum of A[1..i], R[i] be S[i] % K. The sum of subarray A[i..j] = S[j] – S[i] is divisible by K if, and only if, R[i] = R[j]. Hence, we can sort R[i] and find the largest i – j, such that R[i] = R[j]. The total complexity is O(n lg n).

http://ift.tt/1r2htHL

http://ift.tt/XZbCqb



Longest Subarray with Sum Divisible by K | Algorithms Notes







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

via LifeLong Community

Find common elements in three sorted arrays - GeeksforGeeks Given three arrays sorted in non-decreasing...

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



Find common elements in three sorted arrays - GeeksforGeeks



Given three arrays sorted in non-decreasing order, print all common elements in these arrays.

http://ift.tt/XHfQ5t

http://ift.tt/XNfLwT



Find common elements in three sorted arrays - GeeksforGeeks







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

via LifeLong Community

Given an n x n square matrix, find sum of all sub-squares of size k x k - GeeksforGeeks Given an n x...

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



Given an n x n square matrix, find sum of all sub-squares of size k x k - GeeksforGeeks

Given an n x n square matrix, find sum of all sub-squares of size k x k

http://ift.tt/1mAbIjq

http://ift.tt/Za2AYo



Given an n x n square matrix, find sum of all sub-squares of size k x k - GeeksforGeeks







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

via LifeLong Community

Dynamic Programming | Set 33 (Find if a string is interleaved of two other strings) - GeeksforGeeks ...

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



Dynamic Programming | Set 33 (Find if a string is interleaved of two other strings) - GeeksforGeeks



Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is said to be interleaving A and B, if it contains all characters of A and B and order of all characters in individual strings is preserved.

http://ift.tt/1mNYYir

http://ift.tt/1DruRcq



Dynamic Programming | Set 33 (Find if a string is interleaved of two other strings) - GeeksforGeeks







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

via LifeLong Community