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
U-Boot SPL 2024.04-rc4-00192-g6e73d056c95 (Mar 12 2024 - 14:50:12 +0530) | |
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)') | |
SPL initial stack usage: 13448 bytes | |
Trying to boot from DFU | |
####DOWNLOAD ... OK | |
Ctrl+C to exit ... | |
Loading Environment from nowhere... OK | |
init_env from device 18 not supported! | |
Starting ATF on ARM64 core... |
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
U-Boot SPL 2024.04-rc2-00097-g00ae3f7268b (Feb 23 2024 - 23:43:13 +0530) | |
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.9--v09.01.09 (Kool Koala)') | |
Initialized 4 DRAM controllers | |
SPL initial stack usage: 13448 bytes | |
Trying to boot from MMC2 | |
Loading Environment from nowhere... OK | |
Starting ATF on ARM64 core... | |
NOTICE: BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty |
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
U-Boot SPL 2024.04-rc2-00097-g00ae3f7268b (Feb 23 2024 - 23:36:51 +0530) | |
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.9--v09.01.09 (Kool Koala)') | |
Initialized 4 DRAM controllers | |
SPL initial stack usage: 13448 bytes | |
Trying to boot from MMC2 | |
Authentication passed | |
Authentication passed | |
Authentication passed | |
Loading Environment from nowhere... OK |
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
class Solution { | |
public: | |
int leastInterval(vector<char>& tasks, int n) { | |
int c[26] = {0}; | |
priority_queue<int> pq; | |
queue<vector<int>> q; | |
for(int i = 0; i < tasks.size(); i++) | |
c[tasks[i]-'A']++; |
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
class Solution { | |
public: | |
vector<int> topKFrequent(vector<int>& nums, int k) { | |
vector<int> ret; | |
priority_queue <unsigned long long> q; | |
unordered_map <int, int> h; | |
for (int i = 0; i< nums.size(); i++) { | |
h[nums[i]] = h[nums[i]]+1; | |
} |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
typedef struct Node Node; | |
struct Node { | |
int data; | |
Node *l; | |
Node *r; | |
}; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define swap(a,b) swap_func(&a, &b) | |
void swap_func(int *a, int*b) { | |
int t = *a; | |
*a = *b; | |
*b = t; | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define c1(i) 2*i + 1 | |
#define c2(i) 2*i + 2 | |
#define p(i) (i-1)/2 | |
struct Heap { | |
int *heap; |
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
bool isValid(char* s) { | |
int stack[10000]; | |
int top=-1; | |
for(int i = 0; i < strlen(s); i++) | |
{ | |
switch(s[i]) | |
{ | |
case '(' : stack[++top] = 1; | |
continue; |
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
Counting bits set, in parallel | |
unsigned int v; // count bits set in this (32-bit value) | |
unsigned int c; // store the total here | |
static const int S[] = {1, 2, 4, 8, 16}; // Magic Binary Numbers | |
static const int B[] = {0x55555555, 0x33333333, 0x0F0F0F0F, 0x00FF00FF, 0x0000FFFF}; | |
c = v - ((v >> 1) & B[0]); | |
c = ((c >> S[1]) & B[1]) + (c & B[1]); | |
c = ((c >> S[2]) + c) & B[2]; | |
c = ((c >> S[3]) + c) & B[3]; |
NewerOlder