Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The Utopian tree goes through 2 cycles of growth every year. The first growth cycle occurs during the spring, | |
when it doubles in height. The second growth cycle occurs during the summer, when its height increases by 1 meter. | |
Now, a new Utopian tree sapling is planted at the onset of the spring. Its height is 1 meter. Can you find the | |
height of the tree after N growth cycles? */ | |
#include<iostream> | |
#include<vector> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* You are given an integer N. Find the digits in this number that exactly divide N and display their count. | |
For N = 24, there are 2 digits - 2 & 4. Both these digits exactly divide 24. So our answer is 2. */ | |
#include<iostream> | |
#include<string> | |
using namespace std; | |
int main(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Quicksort implementation """ | |
def quicksort(arr): | |
""" Quicksort a list | |
:type arr: list | |
:param arr: List to sort | |
:returns: list -- Sorted list | |
""" |
NewerOlder