Category : storage

I’m trying to save a union in the RTC memory of my ESP32 but it doesn’t semm to work. This is an example of what I’m trying to do: RTC_DATA_ATTR union { float float_variable; byte temp_array[4]; } u; int sleepTime =5; RTC_DATA_ATTR int cpt = 0; void setup() { Serial.begin(115200); esp_sleep_enable_timer_wakeup(sleepTime * 1000000); u.float_variable=2.1; } ..

Read more

Can anyone look into a rather weird doubt.. Its about printing the LCS (Longest Common Subsequence).. I have written my codein two different ways which are exactly same but with a slight difference while filling up the 2D array dp My code : #include <bits/stdc++.h> using namespace std; int main(){ string text1 = "abcde"; string ..

Read more