jaip42
BAN USER- 1of 1 vote
AnswersWrite a function that accepts root of a binary tree and print zigzag level order traversal, each level print in new line.
- jaip42 in India for Kindle
For example,
Given tree:
1
2 3
4 5 6 7
8 9
output:
1
2 3
7 6 5 4
8 9| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures - 0of 0 votes
AnswersWrite a function that accepts root of a binary tree and return true if it is foldable otherwise return false. A binary tree is foldable if left subtree of root is mirror image if right subtree.
- jaip42 in India for Kindle
For example:
Given tree,
1
2 3
4 5 5 4
6 6
output: true| Report Duplicate | Flag | PURGE
Amazon SDE1 - 1of 1 vote
AnswersWrite a function that accepts root of a binary tree and return true if it is foldable otherwise return false. A binary tree is foldable if left subtree of root is mirror image if right subtree.
- jaip42 in India for Kindle
For example:
Given tree,
1
2 3
4 5 5 4
6 6
output: trus| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures - 1of 1 vote
AnswersWrite a function that accepts root of a binary tree and print zigzag level order traversal, each level print in new line.
- jaip42 in India for Kindle
For example,
Given tree:
1
2 3
4 5 6 7
8 9
output:
1
2 3
7 6 5 4
8 9| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures - 2of 2 votes
AnswersWrite a function that accepts two character arrays each represents a floating point number and return their sum in character array.
- jaip42 in India for Kindle
For example function accepts "23.45" and "2.5" and return their sum "25.95".
Restriction: We cannot use predefined functions / methods or parsing. We have to go with basic operations.| Report Duplicate | Flag | PURGE
Amazon SDE1 Data Structures
mirror image means value as well as nodes must match.
- jaip42 May 11, 2015