Skip to content

Instantly share code, notes, and snippets.

View QuadradS's full-sized avatar

Danil QuadradS

  • Kyrgyzstan
View GitHub Profile
@QuadradS
QuadradS / gist:58eb31e17ed53943ccc508b4f2306438
Last active May 18, 2024 07:36
Finished generate Parentheses
// Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
// Example 1:
// Input: n = 3
// Output: ["((()))","(()())","(())()","()(())","()()()"]
// Example 2:
// Input: n = 1
// Output: ["()"]
@QuadradS
QuadradS / resend.rs
Created January 14, 2025 08:52
Create pda and send token back
#[derive(Accounts)]
pub struct SendBack<'info> {
#[account(
mut,
seeds = [constants::CONFIG_ACCOUNT_SEED.as_bytes()],
bump
)]
/// CHECK only read
sender: AccountInfo<'info>,
#[account(mut)]