Popular Posts
-
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...
-
Given a binary matrix, find out the maximum size square sub-matrix with all 1s. Algorithm: Let the given binary matrix be M[R][C]. The idea ...
-
The bustling town of Siruseri has just one sports stadium. There are a number of schools, colleges, sports associations, etc. that use this ...
-
Refer : http://education.cdacmumbai.in/education/pgdst/dsalfac/notes/ShellSort.pdf Shellsort works by comparing elements that are distant r...
-
Many of you might not be knowing that if you have 1 gmail id … you have infinte gmail ids… Seems to be a joke.. It’s not actually… for e.g ...
-
How to find kth smallest element in BST . you cannot use static/global variable and you cannot pass value of k to any function ? Solution ...
-
Find the maximum rectangle (in terms of area) under a histogram in linear time. I mean the area of largest rectangle that fits entirely in t...
-
There is an integer array consisting positive and negative integers. Find maximum positive difference S defined as: O(N) solution S = a[i] ...
-
Q: Given an integer x and an unsorted array of integers, describe an algorithm to determine whether two of the numbers add up to x. If we ha...
-
http://effprog.blogspot.com/2011/02/duplicate-removal-in-binary-search-tree.html http://shashank7s.blogspot.com/2011/03/write-program-to-rem...
Showing posts with label Question list. Show all posts
Showing posts with label Question list. Show all posts
Monday, April 23, 2012
Saturday, March 10, 2012
All algo questions
- Big O notation explanation
- Maximum number of nested envelopes
- Paint fill function
- Print all valid combinations of n-pairs of parantheses
- Check reason for application slowing down
- Number of words in a language
- Prims' algorithm
- Maximum area rectangle in a histogram
- Card shuffle
- Antipodal points
- Word suggest
- Suffix trees
- Spell checking using trie
- Trie datastructure
- Rabin-karp algorithm
- Skip lists
- Knuth-morris-pratt algorithm
- Find square root using babylonian method
- Josephus problem
- Finding prime numbers using sieve of eratosthenes
- Cormen solutions
- Power set or combination problem
- Number of words with length n
- Random shuffle algorithm
- Sliding window approach
- Combinations of a string
- Logical gates algorithm
- How free pointer works ?
- Quad tree algorithm
Common stuff
- *************Nth prime number
- *************Ugly numbers
- *************Matching braces using tail recursion
- *************Amazon bar raiser interview question
- *************Random number generator
- Check leap year
- Important blogs
- Minimum skills required to be a developer in my company
- Maximum of two values using abs
- Count of numbers up to n which are both square and cube
- Find the 8 digit number
- What really happens when u enter a URL in browser
- Stand ups in scrum
- Ten ways to check if integer is power of 2 or not
- Swap two variables without using temporary variable
- Modulus operation
- Find x power y in logN complexity
- GCD
- Which loop is faster ?
- ************Number conversions
- Log function
- Prime factors of a number
- Determine if a point is inside a triangle?
- ***********CTRL+A, CTRL+C, CTRL+V
- Check whether N is power of x or not
- Multiply two numbers with out using loops or multiplication or division
String question list
- Geeksforgeeks
- String pattern searching
- ***********Length of the longest string without repeating characters
- Find first non repeating character
- Second non repeating character
- Inter leavings of two strings
- All permutations of a given string
- Print reverse of a string using recursion
- Check if strings of rotations of each other
- Are given characters of a string form palindrome ?
- Reverse words in a given string
- Divide a string in N equal parts
- Print list items containing all characters of a given word
- Swap two words in a given sentence.
- Remove pairs of characters in a string
- Minimum distance between two characters in a string
- Reverse a string
- *************** Longest sub string palindrome in a given string
- ***************Find the smallest window in a string, containing all characters of another string
- Run length encoding
- Remove characters from the first string which are present in another string
- Print all duplicated in the input string
- Remove all duplicates from the input string
- Maximum occurring character character in the input string
- Naive pattern searching I
- Naive pattern searching II
- ************Rabin karp algorithm
- ************KMP algorithm: another good article
All DP Questions
- Dp in geeks
- Divide and conquer
- Backtracking
- Recursion
- Matrix chain multiplication
- Binomial coefficient
- N Queen problem
- Rat in a maze
- Knight's tour problem
- Coin change
- Dp resources
- Minimum number of jumps to reach last step
- Restaurant problem
- Count number of ways
- Apple problem
- Character combination for numbers
- Knapsack problem
- Max possible sum of non consecutive numbers
- Avid tv watcher
- Maximum downward sum
- Nth fibanocci number
- Edit distance
- Maximum size square sub matrix with all ones
- Unique paths in a grid
- Coins in a line
- Street trees
- Longest increasing subsequence
- Ransome note
- Minimum number of bus stations
- Activity selection problem(Greedy algorithm)
Tuesday, February 7, 2012
All logical bit questions
- Geeksforgeeks
- Swap bits in a given number
- **Find missing number in an array
- ** Find element which occurs only once except it all occurs thrice
- *************Find even occurring element in an array
- Find repeating and missing elemeny
- Count number of set bits in a number
- Count number of set bits in an array
- Swap two nibbles in an array
- **************Find sum of two numbers using bitwise operators
- Left shift fiddle in java
- Infinite stream of bits divisible by 3
- Smallest of three integers without comparison operators
- Boolean array puzzle
- *************Next higher number with same number of bits
- Optimization technique
- *************Add 1 to a given number
- Multiply given integer with 3.5
- Turn off right most set bit
- ***********Find whether given number is power of 4 or not
- ***********Compute integer absolute value with out branching
- Compute modulus division by a power of 2 number
- Compute minimum or maximum of two numbers with out branching
- ***********Rotate bits of a number
- ***********Find the two non repeating elements in an array of repeating elements
- ***********Count the number of bits to be flipped to convert a to b
- Count set bits in a number
- Reverse bits of a number
- Little and big endian
- Check for integer overflow
- Find the number occurring odd number of times
- Position of right most set bit
- Check whether a number is power of two or not
- Efficient way to multiply with 7
- Find parity of an unsigned number
- Check if a number is multiple of 3 or not
- Next power of 2
Linked list, Stack and queue questions
- Linked List questions in GeeksForGeeks
- ********* Copy a linked list with next and arbitrary pointer
- *********Reverse linked list iteratively and recursively
- Add two numbers stored in linked lists
- Linked list traversal
- ***********Merge two sorted linked lists. code
- Skip Lists
- Remove duplicate nodes in unsorted linked list
- Reverse alternate k nodes of a linked list
- Remove nodes which have greater value on right side in linked list
- Reverse a linked list
- Find intersection of two linked lists
- *******Write queue using stack
- Find 10 maximum numbers from a billion numbers
- ***********Element relationship in an array
- Reverse a stack inplace using recursion
- Design a resource pool which promised FIFO to every client
- Applications of priority heaps
- Delete a given node in linked list under given constraints
- Write a function to modify head pointer of a linked list
- XOR memory efficient doubly linked list
- Memory efficient doubly linked lst
- *************Detect and remove a loop in linked list
- Detect loop in linked list
- Segregate even and odd nodes in a linked list
- Reverse alternate k nodes in a singly linked list
- ***********Sorted insert for circular linked list
- Linked list vs array
- Reverse a linked list in a group of given size
- Merge sort for linked lists
- Merge two sorted linked lists
- Identical linked lists
- Alternating split of a given linked list
- Delete alternate nodes of a linked list
- Intersection of two sorted linked lists
- Delete a node in doubly linked list
- Pairwise swap elements of given linked list
- Move last element to front of a given linked list
- Split circular linked list into two halves
- ********Reverse doubly linked list
- Recursive function to print reverse of a linked list
- ********Reverse a linked list
- Remove duplicates from an unsorted linked list
- ******Remove duplicates from a sorted linked list
- Intersection point of two linked lists
- *************** Insert a node into sorted linked list
- ***************Great tree list recursion problem
- Check if singly linked list is palindrome
- Given a pointer to a node to be deleted, how will you delete ?
- Given only a pointer to a node to be deleted in a singly linked list, how do you delete it?
- Count number of times a number occurs in a linked list
- Nth node from the end of linked list
- Print middle of a linked list
- Print Nth node of a linked list
- Union and intersection of two linked lists
- A Queue that Supports Enqueue, Dequeue, and GetMin in Constant Time
- A Stack that Supports Push, Pop, and GetMin in Constant Time
- Implement two stacks in an array
All array questions
- Geeksforgeeks
- **Bitonic sub array
- **Find smallest missing number
- ** Maximal sub array(Largest continuous sum)
- ** Count inversions in an array
- ** Sort an array of 0s, 1s and 2s
- ** Equilibrium index of an array
- **Median of two sorted lists
- ** Print next greater element in unsorted array
- ** Contiguous sub array which sums to zero
- ** Median of integer stream
- *********Min Heap implementation in java
- *********Max heap implementation in java
- Sort elements by frequency
- Given an array and an element x, check for pair in a[] with sum as x
- **************Merge an array of size n into another array of size m+n
- Search an element in a sorted and pivoted array
- Leaders in an array
- Block swap algorithm for array rotation
- Reversal algorithm for array rotation
- Reverse an array
- Program for array rotation
- Maximum and minimum of an array using minimum number of comparisons
- Find smallest and second smallest elements in an array
- ************Find duplicate elements in an array
- ************Floor and ceiling in sorted array
- Union and intersection of two sorted arrays
- Find the minimum length unsorted sub array, sorting which makes the complete array sorted
- **Find the two repeating elements in an array : check code for marking visited node as -ve
- Find k largest or smallest elements in an array
- Check if array elements are consecutive ?
- Find repeating and missing element in an array
- *********Given an array arr[], find the maximum j – i such that arr[j] > arr[i]
- Find fixed point in an array
- Find whether an array is subset of another array
- ********Find next palindrome
- ********Search for an element in unknown length array
- Maximum element in an array which is first increasing and then decreasing
- Find missing element in an array
- Next higher number with the same digits
- Move set of elements to destined location of an array
- Maximum contiguous product in an array
- **********Count number of minimum elements on right side of each element in an array
- Partition array into even and odd parts
- Segregate 0s and 1s
- Maximum number of ones in a row of an array
- Anagrams in a dictionary
- ***********Linear time majority vote algorithm
- *********Majority element(same as above problem)
- Boolean paranthesize
- Minimum element in an rotated array
- ***********Axis aligned rectangles
- 3 sum and 2 sum problem
- Composition of a number
- Selecting k smallest or largest elements
- Find existence of a word in a maze
- *********Maximum difference in an array
- *********Best day to sell and buy stocks
- Number of occurances of a number in an array
- *********Permutation of digits represented by phone number
- Maximum of all sub arrays of size k
- *********Find triplet whose distance is minimum
- Check given string is anagram or not
- Find product of sub arrays with out using division operator
- Rotating an array in place
- Search for an element in rotated sorted array
- *********Find all unique triplets whose sum is zero
- Two elements whose sum is closest to zero
- ********Find kth smallest element in union of two sorted arrays
- Finding elements near the median
- Array division into groups
- **Triplet with minimum distance
Saturday, February 4, 2012
All Tree questions
- Geeksforgeeks
- Convert a given tree to a sum tree
- Populate in order successor for all nodes
- **In order successor in BST
- **Connect nodes at same level using constant extra space
- **Connect Nodes at the same level
- **Trie data Structure
- **Decision Tree
- **Construct a tree from in order and pre order traversal
- **In order traversal with out recursion
- **Inorder traversal with out recursion and without stack
- Convert an arbitrary tree to a tree that holds children sum property
- Check if a given tree is BST or not
- Size of a tree
- Lowest common ancestor
- Tree traversals
- Check if two trees are identical
- Maximum depth of a tree
- Which traversal sequence needed to construct a binary tree
- Find the node with minimum value in BST
- Print all root to leaf paths one per line
- Count leaf nodes in a tree
- Check for children sum property in binary tree
- Check if tree is height balanced ?
- ***********Tournament Tree (Winner Tree) and Binary Heap
- ***********Get Maximum width of a tree
- Root to leaf path sum equal to given number
- Check if a given tree is sum tree or not
- Print ancestors of a node in tree
- Print nodes at K distance from root
- Sorted array to balanced BST
- Sorted order printing of a given array that represents a BST
- Construct a binary search tree
- Trim binary search tree
- Mirror image of a tree in iterative way
- Mirror image of a tree in recursive way
- Level of a node in a binary search tree
- Peripheral of a tree
- Isomorphic tree
- Quasi isomorphic trees
- Is a tree complete
- Level order tree traversal
- Level order traversal of a tree in spiral form
- Binary search of a tree
- Binary search tree validity
- Saving binary search tree to a file
- Serialization and de serialization of binary tree
- Successor or predecessor rules in a binary tree
- Remove duplicate nodes in a binary search tree
- Is sub tree ?
- Pint edge(boundary) nodes of a tree
- Anti clock wise peripheral of a tree
- ************Largest binary search tree in a binary tree*************
- Diameter of a binary tree
- **********Convert binary tree into spiral doubly linked list
- Foldable binary trees
- ***********Convert binary tree into doubly linked list
- Find Kth largest and smallest number in Binary search tree
- Minimum distance between two nodes of a binary tree
- Vertical sum in a binary tree
- Merge two balanced binary search trees
- Maximum sum leaf to root path in binary tree
Tuesday, February 15, 2011
Important Java G-fact links from GeeksforGeeks
Java Related G facts:
- http://blogs.oracle.com/sandip/entry/how_to_be_a_good
- http://geeksforgeeks.org/?p=10320
- http://geeksforgeeks.org/?p=10270
- http://geeksforgeeks.org/?p=9788
- http://geeksforgeeks.org/?p=9592
- http://geeksforgeeks.org/?p=9059
- http://geeksforgeeks.org/?p=9086
- http://geeksforgeeks.org/?p=9629
- http://geeksforgeeks.org/?p=9598
- http://geeksforgeeks.org/?p=9562
- http://geeksforgeeks.org/?p=9496
- http://geeksforgeeks.org/?p=9148
- http://geeksforgeeks.org/?p=9279
- http://geeksforgeeks.org/?p=9179
- http://geeksforgeeks.org/?p=9043
- http://geeksforgeeks.org/?p=9026
- http://geeksforgeeks.org/?p=9007
- http://geeksforgeeks.org/?p=8996
- http://geeksforgeeks.org/?p=8926
- http://geeksforgeeks.org/?p=8928
- http://geeksforgeeks.org/?p=8876
- http://geeksforgeeks.org/?p=8870
- http://geeksforgeeks.org/?p=8240
- http://geeksforgeeks.org/?p=7695
- http://geeksforgeeks.org/?p=7617
Subscribe to:
Posts (Atom)