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
commit 9d5cea1417cc2bc6918cb58b87ed92c6f95ea6c6 | |
Author: Feng Wang <fwang49@asu.edu> | |
Date: Thu Sep 8 11:42:44 2016 -0700 | |
update to 1.1.0 | |
diff --git a/PKGBUILD b/PKGBUILD | |
index c0d677f..b18dc32 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD |
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
class Solution { | |
private: | |
string compare(string& a, string& b) { | |
int n = min(a.length(), b.length()); | |
for (int i = 0; i < n; ++i) { | |
if (a[i] != b[i]) { | |
string result = ""; | |
result.push_back(a[i]); | |
result.push_back(b[i]); | |
return result; |
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
class Solution { | |
private: | |
string compare(string& a, string& b) { | |
int n = min(a.length(), b.length()); | |
for (int i = 0; i < n; ++i) { | |
if (a[i] != b[i]) { | |
return {a[i], b[i]}; | |
} | |
} | |
return ""; |
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 <vector> | |
#include <string> | |
#include <algorithm> | |
using namespace std; | |
class Ordering { | |
private: | |
bool toposort(string& dict, vector<string>& graph, vector<int>& indegrees, string& cache) { |
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
class Solution { | |
private: | |
struct State { | |
string key; | |
vector<int> board; | |
vector<int> indices; | |
}; | |
string encode(vector<int>& vec) { | |
string result = ""; |
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
class Solution { | |
private: | |
struct State { | |
string key; | |
vector<int> board; | |
vector<int> indices; | |
}; | |
string encode(vector<int>& vec) { | |
string result = ""; |
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 <vector> | |
#include <unordered_map> | |
#include <queue> | |
#include <algorithm> | |
using namespace std; | |
struct State { | |
int key; |
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 <vector> | |
#include <unordered_map> | |
#include <unordered_set> | |
#include <queue> | |
#include <algorithm> | |
using namespace std; | |
struct State { |
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 <vector> | |
#include <unordered_map> | |
#include <unordered_set> | |
#include <queue> | |
#include <algorithm> | |
#include <sstream> | |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class SlidingPuzzle { | |
private: | |
int inversions(vector<int>& board) { | |
int result = 0; | |
for (int i = 0; i < board.size(); ++i) { | |
for (int k = i + 1; k < board.size(); ++k) { |
OlderNewer