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: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), | |
); |
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
// 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. |