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
public class Solution { | |
public void nextPermutation(int[] num) { | |
if(num.length==0) return; | |
int length=num.length; | |
int end=length-1; | |
int i=end-1; | |
for(; i>=0; i--) | |
{ | |
if(num[i]>=num[i+1]) continue; //get an increasing set from the end | |
int j=end; |
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
/****************************************************************************** | |
Array Implementation and Analysis | |
*******************************************************************************/ | |
#include <memory> | |
#include <iostream> | |
template<typename T, size_t C> | |
class Array |
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
#include <iostream> | |
#include <string> | |
#include <exception> | |
#include <stdexcept> | |
#include <iterator> | |
#include <algorithm> | |
#include <memory> | |
template <typename T> class Vector { | |
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
/** | |
* @author : akshay.mathur | |
**/ | |
@Singleton | |
public class WebClient { | |
private final Client client; | |
@Inject | |
public WebClient(Client client) { | |
this.client = client; |
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
@Singleton | |
public class WebClient { | |
private final Client client; | |
@Inject | |
public WebClient(Client client) { | |
this.client = client; | |
} | |
public Object call(String url){ |