Click here to Skip to main content
15,916,835 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: How to get faster serial port data transfer on windows forms Pin
Member 1480999622-Apr-20 22:32
Member 1480999622-Apr-20 22:32 
QuestionHow to generate a network where nodes have certain number of neighbors on average Pin
Meanwhale7-Apr-20 20:15
Meanwhale7-Apr-20 20:15 
AnswerRe: How to generate a grid where nodes have certain number of neighbors on average Pin
Gerry Schmitz9-Apr-20 11:01
mveGerry Schmitz9-Apr-20 11:01 
GeneralRe: How to generate a grid where nodes have certain number of neighbors on average Pin
Meanwhale9-Apr-20 19:46
Meanwhale9-Apr-20 19:46 
GeneralRe: How to generate a grid where nodes have certain number of neighbors on average Pin
Meanwhale9-Apr-20 19:53
Meanwhale9-Apr-20 19:53 
Question>net Pin
Member 147935355-Apr-20 19:51
Member 147935355-Apr-20 19:51 
AnswerRe: >net Pin
Richard MacCutchan5-Apr-20 21:31
mveRichard MacCutchan5-Apr-20 21:31 
QuestionLooking for an optimized algorithm to create a nested dictionaries and dump the same into yam format Pin
Member 120989893-Apr-20 9:25
Member 120989893-Apr-20 9:25 
I have a a tree

Root
/ | \
V R M

/ | \ | \
L1 L2 Sub L6 MCon
/\
L3 L4 \
L7


class Container {

Id getUid()
leafList getLeafs() { return leafs; }

leafs
}

class Leave {
Id getUid()
}


Where in the above Tree is N Ary tree

Root ,V,R,C,Sub,RLcon,MCon are Containers
L1,L2,L3,L4,L6,L7 are leaf nodes

I have following data
1) root container pointer
2) root.getContainers - return list of sub containers - for example
root.getContainers will return here V,R,and M
V.getContainers will return Sub
V.getLeafs will return L1,L2,


I have a Create a Yaml Dump from Nested Ordered Dictionary

The dump of output nested dictionaries is as follows

V:
UidOfL1:
Name :L1
type : leafOfV
UidOfL2:
Name :L2
type : leafOfV
UidOfSub:
Name :Sub
type : Container
R:
UidOfL6:
Name :L6
type : leafOfR
MCon:
UidOfL7:
Name :L7
type : leafOfM


The algorithm has to be designed using OrederedDict of python
Can someone help me to write the correct and optimized algorithm in python
AnswerRe: Looking for an optimized algorithm to create a nested dictionaries and dump the same into yam format Pin
Richard MacCutchan3-Apr-20 21:55
mveRichard MacCutchan3-Apr-20 21:55 
QuestionString reversal algorithm Pin
Pita3227-Mar-20 13:36
Pita3227-Mar-20 13:36 
AnswerRe: String reversal algorithm Pin
k505427-Mar-20 14:26
mvek505427-Mar-20 14:26 
RantRe: String reversal algorithm Pin
Richard Deeming31-Mar-20 1:14
mveRichard Deeming31-Mar-20 1:14 
GeneralRe: String reversal algorithm Pin
Richard MacCutchan31-Mar-20 2:32
mveRichard MacCutchan31-Mar-20 2:32 
GeneralRe: String reversal algorithm Pin
Member 147935355-Apr-20 19:52
Member 147935355-Apr-20 19:52 
QuestionTravelling Salesman Problem Pin
wscwt0118-Mar-20 7:39
wscwt0118-Mar-20 7:39 
AnswerRe: Travelling Salesman Problem Pin
k505418-Mar-20 8:48
mvek505418-Mar-20 8:48 
GeneralRe: Travelling Salesman Problem Pin
wscwt0118-Mar-20 11:12
wscwt0118-Mar-20 11:12 
GeneralRe: Travelling Salesman Problem Pin
Member 147935355-Apr-20 19:53
Member 147935355-Apr-20 19:53 
AnswerRe: Travelling Salesman Problem Pin
Greg Utas18-Mar-20 9:28
professionalGreg Utas18-Mar-20 9:28 
GeneralRe: Travelling Salesman Problem Pin
wscwt0118-Mar-20 11:11
wscwt0118-Mar-20 11:11 
QuestionVehicle routing problem for large graph Pin
Member 147325527-Mar-20 12:23
Member 147325527-Mar-20 12:23 
GeneralRe: Vehicle routing problem for large graph Pin
harold aptroot7-Mar-20 13:35
harold aptroot7-Mar-20 13:35 
GeneralRe: Vehicle routing problem for large graph Pin
Member 147325528-Mar-20 0:51
Member 147325528-Mar-20 0:51 
GeneralRe: Vehicle routing problem for large graph Pin
harold aptroot8-Mar-20 4:28
harold aptroot8-Mar-20 4:28 
GeneralRe: Vehicle routing problem for large graph Pin
Member 147325528-Mar-20 6:41
Member 147325528-Mar-20 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.