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
/// find the number of connected components within the undirected graph. | |
/// Component is independent or individual graph within the graph-network | |
/// Also getting the size of the largest component in it. | |
const graph = { | |
0: [8, 1, 5], | |
1: [0], | |
5: [0, 8], | |
8: [0, 5], | |
2: [3, 4], | |
3: [2, 4], |
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
/// A HAS-PATH problem, Given source and destination | |
/// find if there exist any path between them in the | |
/// acyclic/Directed/Unidirectional Graph, | |
/// also cyclic/undirected/bidirectional graph. | |
const graphDirected = { | |
"f": ["g", "i"], | |
"g": ["h"], | |
"h": [], | |
"i": ["g", "k"], |
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
import 'dart:collection'; | |
const graph = { | |
"a": ["b", "c"], | |
"b": ["d"], | |
"c": ["e"], | |
"d": ["f"], | |
"e": [], | |
"f": [], | |
}; |
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
// AnimatedGrid : Transforming Grid to List | |
// Somewhat like this : https://i.stack.imgur.com/HtR9K.gif | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:liquid_swipe/liquid_swipe.dart'; | |
import 'package:flutter/scheduler.dart' show timeDilation; | |
void main() { | |
/// Comment or uncomment to run both examples | |
runApp( | |
//WithBuilder(), | |
WithPages() |
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
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp( | |
MaterialApp( | |
theme: ThemeData(scaffoldBackgroundColor: darkBlue), |