What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-06 18:15:03
find kth max and min element in an array
#include <bits/stdc++.h> using namespace std; int main(){ const int size = 10; int k = 3; //Can be any number smalled than size int array[size] = {5,2,8,34,73,82,1,6,19,29}; sort(array,array+size); int smallestKthElement = array[k-1]; i... Add solution -
C++ 2021-10-06 04:29:04
timsort in c++
// C++ program to perform TimSort. #include<bits/stdc++.h> using namespace std; const int RUN = 32; // Iterative Timsort function to sort the array[0...n-1] (similar to merge sort) void timSort(int arr[], int n){ // Sort individual subarrays o... Add solution -
C# 2021-10-01 00:11:06
save binary data to file c#
// The string we are working with. string str = @"1010101010010100010101101"; // The number of bits in a 64 bit integer! int size = 64; // Pad the end of the string with zeros so the length of the string is divisible by 64. str += new string('0'... Add solution -
C# 2021-09-29 13:17:05
how to trigger event when a com device is connected in c#
/* Headers to be used:- using System; using System.Runtime.InteropServices; */ public Form1() { InitializeComponent(); UsbNotification.RegisterUsbDeviceNotification(this.Handle); } protected override void WndProc(ref Message m) { base.WndP... Add solution