algorithms共1144篇
Data Structures and Algorithms in Python-拾光赋

Data Structures and Algorithms in Python

Data Structures and Algorithms in Python,1. Arrays e Linked Lists Arrays An array is a collection of elements stored in contiguous memory locations. Characteristics: Fast access to...
kity的头像-拾光赋kity7天前
02012
Alien Dictionary-拾光赋

Alien Dictionary

Alien Dictionary, Problem statement You have been given a sorted (lexical order) dictionary of an alien language. Write a function that returns the order of characters as a string ...
kity的头像-拾光赋kity8天前
04710
Bipartite-Based 2-Approximation for Dominating Sets in General Graphs-拾光赋

Bipartite-Based 2-Approximation for Dominating Sets in General Graphs

Bipartite-Based 2-Approximation for Dominating Sets in General Graphs,Frank Vega Information Physics Institute, 840 W 67th St, Hialeah, FL 33012, USA vega.frank@gmail.com Problem S...
kity的头像-拾光赋kity8天前
02613
Leetcode 2385. Amount of Time for Binary Tree to Be Infected-拾光赋

Leetcode 2385. Amount of Time for Binary Tree to Be Infected

Leetcode 2385. Amount of Time for Binary Tree to Be Infected, Problems You are given the root of a binary tree with unique values, and an integer start. At minute 0, an infection s...
kity的头像-拾光赋kity14天前
0226
Local Search vs Stochastic Hill Climbing: Python Implementation, Testing, and Comparative Analysis-拾光赋

Local Search vs Stochastic Hill Climbing: Python Implementation, Testing, and Comparative Analysis

Local Search vs Stochastic Hill Climbing: Python Implementation, Testing, and Comparative Analysis,Optimization of Benchmark Functions Using Local Search and Stochastic Hill Climbi...
kity的头像-拾光赋kity14天前
0399
GeeksforGeeks : M Coloring Problem-拾光赋

GeeksforGeeks : M Coloring Problem

GeeksforGeeks : M Coloring Problem, Problem https://www.geeksforgeeks.org/problems/m-coloring-problem-1587115620/1 You are given an undirected graph consisting of v vertices and a ...
kity的头像-拾光赋kity16天前
05110
Leetcode 19 : Remove nth Node from end of List-拾光赋

Leetcode 19 : Remove nth Node from end of List

Leetcode 19 : Remove nth Node from end of List, Problem Statement https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/ Given the head of a linked list, remov...
kity的头像-拾光赋kity16天前
0316
Prime Function-拾光赋

Prime Function

Prime Function,def get_primes(n): primes = [] candidate = 2 while len(primes) < n: for p in primes: if candidate % p == 0: break else: primes.append(candidate) candidate += 1 re...
kity的头像-拾光赋kity17天前
0469
Recursion Power Sum-拾光赋

Recursion Power Sum

Recursion Power Sum,def powerSum(X, N, num=1): power = num ** N if power > X: return 0 # too big, can't continue elif power == X: return 1 # exact match found else: # either inc...
kity的头像-拾光赋kity18天前
0407
A 2-Approximation Algorithm for Dominating Sets-拾光赋

A 2-Approximation Algorithm for Dominating Sets

A 2-Approximation Algorithm for Dominating Sets,Frank Vega Information Physics Institute, 840 W 67th St, Hialeah, FL 33012, USA vega.frank@gmail.com Introduction to the Minimum Dom...
kity的头像-拾光赋kity18天前
03710
LeetCode 3169. Count Days Without Meetings-拾光赋

LeetCode 3169. Count Days Without Meetings

LeetCode 3169. Count Days Without Meetings, Problem Statement You are given a positive integer days representing the total number of days an employee is available for work (startin...
kity的头像-拾光赋kity20天前
0376
Leetcode 1976 : Number of Ways to Arrive at Destination-拾光赋

Leetcode 1976 : Number of Ways to Arrive at Destination

Leetcode 1976 : Number of Ways to Arrive at Destination, Problem Statement You are in a city with n intersections numbered from 0 to n - 1 with bi-directional roads between some in...
kity的头像-拾光赋kity22天前
02715