Struct Solution

Source
pub struct Solution;

Implementations§

Source§

impl Solution

Source

pub fn single_number(nums: Vec<i32>) -> i32

Source§

impl Solution

Source

pub fn max_product(nums: Vec<i32>) -> i32

Source§

impl Solution

Source

pub fn max_area_5425( h: i32, w: i32, horizontal_cuts: Vec<i32>, vertical_cuts: Vec<i32>, ) -> i32

Source§

impl Solution

Source

pub fn min_reorder(n: i32, connections: Vec<Vec<i32>>) -> i32

Source§

impl Solution

Source§

impl Solution

Source§

impl Solution

Source

pub fn max_area_naive(height: Vec<i32>) -> i32

Source

pub fn max_area_single_pass(height: Vec<i32>) -> i32

Source

pub fn max_area(height: Vec<i32>) -> i32

Source§

impl Solution

Source

pub fn defang_i_paddr<T>(address: T) -> String
where T: Into<String>,

Source§

impl Solution

Source

pub fn roman_to_int<T>(_: T) -> i32
where T: Into<String>,

Source§

impl Solution

Source

pub fn three_sum(nums: Vec<i32>) -> Vec<Vec<i32>>

Source§

impl Solution

Source

pub fn three_sum_closest(nums: Vec<i32>, target: i32) -> i32

Source§

impl Solution

Source

pub fn remove_element(_nums: &mut Vec<i32>, _val: i32) -> i32

Source

pub fn remove_element_two_pointer(nums: &mut Vec<i32>, val: i32) -> i32

Source§

impl Solution

Source

pub fn coin_change_brute_force(coins: Vec<i32>, amount: i32) -> i32

Source

pub fn coin_change_brute_force_recursion( coin_idx: usize, coins: &Vec<i32>, amount: i32, ) -> i32

Source

pub fn coin_change(coins: Vec<i32>, amount: i32) -> i32

Source§

impl Solution

Source§

impl Solution

Source

pub fn is_subsequence<T>(s: T, t: T) -> bool
where T: Into<String>,

Source§

impl Solution

Source

pub fn can_partition_naive(nums: Vec<i32>) -> bool

Source

pub fn can_partition_whats_left(nums: Vec<i32>) -> bool

Source

pub fn can_partition_sort_and_try(nums: Vec<i32>) -> bool

Source

pub fn can_partition_odd_even_counter(nums: Vec<i32>) -> bool

Source

pub fn can_partition_dp_top_down( nums: &Vec<i32>, start_from: usize, whats_left: i32, goal_amount: i32, ) -> bool

Source

pub fn can_partition(nums: Vec<i32>) -> bool

Source§

impl Solution

Source

pub fn longest_palindrome<T>(s: T) -> String
where T: Into<String>,

Source§

impl Solution

Source

pub fn convert<T>(s: T, n: i32) -> String
where T: Into<String>,

Source§

impl Solution

Source

pub fn reverse(input_value: i32) -> i32

Source§

impl Solution

Source

pub fn simplify_path<T>(path: T) -> String
where T: Into<String>,

Source§

impl Solution

Source

pub fn my_atoi<T>(_: T) -> i32
where T: Into<String>,

Source§

impl Solution

Source

pub fn is_palindrome(input_value: i32) -> bool

Source§

impl Solution

Source

pub fn total_fruit(_: Vec<i32>) -> i32

Source§

impl Solution

Source§

impl Solution

Source

pub fn num_trees(n: i32) -> i32

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.