Skip to content

Instantly share code, notes, and snippets.

View AbdulMalikDev's full-sized avatar
💭
learning

Abdul Malik AbdulMalikDev

💭
learning
View GitHub Profile
@makipe
makipe / main.dart
Created January 29, 2021 08:15
Convert Uint8List to Stream<List<int>>
import 'dart:typed_data';
void main() {
final testData = List.filled(1000000, 1);
final uint8List = Uint8List.fromList(testData);
final sw1 = Stopwatch()..start();
final result1 = Stream.value(
List<int>.from(uint8List),
);
// C++ program to show segment tree operations like construction, query
// and update
#include <bits/stdc++.h>
using namespace std;
// A utility function to get the middle index from corner indexes.
int getMid(int s, int e) { return s + (e -s)/2; }
/* A recursive function to get the sum of values in the given range
of the array. The following are parameters for this function.