source for examples

This commit is contained in:
Морозов Андрей 2021-11-23 12:53:01 +00:00
parent f295e933be
commit a990295f7e
5 changed files with 51 additions and 0 deletions

25
tex/dart/flutter.dart Normal file
View File

@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: Scaffold(
appBar: AppBar(
title: const Text('Flutter Demo'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const <Widget>[
Text('Hello World'),
]),
)),
);
}
}

1
tex/dart/hW.dart Normal file
View File

@ -0,0 +1 @@
void main() => print("Hello World");

3
tex/dart/helloWorld.dart Normal file
View File

@ -0,0 +1,3 @@
void main() {
print("Hello World");
}

10
tex/dart/pseudoBFS.txt Normal file
View File

@ -0,0 +1,10 @@
BFS(G, s):
queue Q
s <- visited
Q.add(s)
while (Q.not_empty):
u = Q.pop
for a in u.connections:
if a is unvisited:
Q.add(a)
a <- visited

12
tex/dart/pseudoDFS.txt Normal file
View File

@ -0,0 +1,12 @@
function doDfs(G[n]: Graph):
visited = array[n, false]
function DFS(u: int):
visited[u] = true
for v: (u, v) in G:
if not visited[v]:
DFS(v)
for i = 1 to n:
if not visited[i]:
DFS(i)