Skip to content

Instantly share code, notes, and snippets.

View GolakiyaVishal's full-sized avatar
:electron:
Controlling

GoVishal GolakiyaVishal

:electron:
Controlling
View GitHub Profile
@GolakiyaVishal
GolakiyaVishal / .gitignore
Last active July 22, 2021 15:47 — forked from pingrishabh/.gitignore
Standardised gitignore for your Flutter apps & Dart projects
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
@GolakiyaVishal
GolakiyaVishal / validate_subsequence.dart
Created November 24, 2020 14:17
A simple algorithm to validate subsequence
// with null safety
void main() {
print(isValidSubsequence([5, 1, 22, 6, -1, 8, 10], [1, 6, -1, 10]));
}
/** Validate Subsequence*/
bool isValidSubsequence(List<int> array, List<int> sequence) {
if (array.length <= 0) return false;