Sei sulla pagina 1di 7

5/12/12

Divide And Conquer | GeeksforGeeks

GeeksforGeeks
A computer science portal for geeks Home Q&A Interview Corner Ask a question Feedback Contribute About us Subscribe Arrays Articles Bit Magic C/C++ Puzzles GFacts Linked Lists MCQ Misc Output Strings Trees

Browsing the tag Divide and Conquer Find the maximum element in an array which is first increasing and then decreasing
20 Comments | Filed under Arrays January 14, 2012 Given an array of integers which is initially increasing and then decreasing, find the maximum value in the array. Read More

Find a Fixed Point in a given array


www.geeksforgeeks.org/archives/tag/divide-and-conquer 1/7

5/12/12

Divide And Conquer | GeeksforGeeks

25 Comments | Filed under Arrays December 1, 2011 Given an array of n distinct integers sorted in ascending order, write a function that returns a Fixed Point in the array, if there is any Fixed Point present in array, else returns -1. Read More

Count the number of occurrences in a sorted array


20 Comments | Filed under Arrays May 3, 2011 Given a sorted array arr[] and a number x, write a function that counts the occurrences of x in arr[]. Expected time complexity is O(Logn) Read More

Program to count number of set bits in an (big) array


2 Comments | Filed under Bit Magic March 12, 2011 Given an integer array of length N (an arbitrarily large number). How to count number of set bits in the array? Read More

Maximum and minimum of an array using minimum number of comparisons


20 Comments | Filed under Arrays February 15, 2010 Write a C function to return minimum and maximum in an array. You program should make minimum number of comparisons. Read More

Check for Majority Element in a sorted array


20 Comments | Filed under Arrays
www.geeksforgeeks.org/archives/tag/divide-and-conquer 2/7

5/12/12

Divide And Conquer | GeeksforGeeks

February 11, 2010 Question: Write a C function to find if a given integer appears more than n/2 times in a sorted array of n integers. Read More

Count Inversions in an array


11 Comments | Filed under Arrays January 5, 2010 Inversion Count for an array indicates how far (or close) the array is from being sorted. If array is already sorted then inversion count is 0. If array is sorted in reverse order that inversion count is the maximum. Read More

Median of two sorted arrays


42 Comments | Filed under Arrays September 28, 2009 Question: There are 2 sorted arrays A and B of size n each. Write an algorithm to find the median of the array obtained after merging the above 2 arrays(i.e. array of length 2n). The complexity should be O(log(n)) Read More

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


12 Comments | Filed under Misc March 22, 2009 Below solution divides the problem into subproblems of size y/2 and call the subproblems recursively. Read More

Search
www.geeksforgeeks.org/archives/tag/divide-and-conquer 3/7

5/12/12

Divide And Conquer | GeeksforGeeks

Popular Tags
GATE Java Dynamic Programming Backtracking Pattern Searching Divide & Conquer Graph Operating Systems Recursion

Popular Posts
All permutations of a given string Memory Layout of C Programs Understanding extern keyword in C Median of two sorted arrays Tree traversal without recursion and without stack! Structure Member Alignment, Padding and Data Packing Intersection point of two Linked Lists Lowest Common Ancestor in a BST. Check if a binary tree is BST or not Sorted Linked List to Balanced BST

www.geeksforgeeks.org/archives/tag/divide-and-conquer

4/7

5/12/12

Divide And Conquer | GeeksforGeeks

250

Subscribe

Forum Latest Discussion


LIS in nlogn time
Last Post By: kartik Inside: Interview Questions

tree to file
Last Post By: Dheeraj Inside: Interview Questions
www.geeksforgeeks.org/archives/tag/divide-and-conquer 5/7

5/12/12

Divide And Conquer | GeeksforGeeks

Count internal nodes in a binary tree


Last Post By: kartik Inside: Interview Questions

Ancestor of two given leaf nodes


Last Post By: dead Inside: Trees specific questions

combine elements of an array, so as to minimize weights.


Last Post By: rohanag Inside: Interview Questions

FB interview question
Last Post By: ranganath111 Inside: Interview Questions

Testing of factorial of a number


Last Post By: rukawa Inside: Interview Questions

numeric puzzle
Last Post By: asm Inside: Algorithms

Forum Categories
Interview Questions C/C++ Programming Questions Algorithms Trees specific questions Linked List specific questions Multiple Choice Questions Object oriented queries GPuzzles
www.geeksforgeeks.org/archives/tag/divide-and-conquer 6/7

5/12/12

Divide And Conquer | GeeksforGeeks

Operating Systems Miscellaneous Java specific Questions Perl specific Questions

Recent Comments
Venki on Structure Member Alignment, Padding and Data Packing avi on Structure Member Alignment, Padding and Data Packing atul on A Program to check if strings are rotations of each other or not Venki on Structure Member Alignment, Padding and Data Packing rahul on Dynamic Programming | Set 13 (Cutting a Rod) Sandeep on Dynamic Programming | Set 3 (Longest Increasing Subsequence) Yueming on Dynamic Programming | Set 3 (Longest Increasing Subsequence) avi on Structure Member Alignment, Padding and Data Packing @geeksforgeeks, Some rights reserved Powered by WordPress & MooTools, customized by geeksforgeeks team

www.geeksforgeeks.org/archives/tag/divide-and-conquer

7/7

Potrebbero piacerti anche