Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website ๐Ÿ˜Š
Still working on it ๐Ÿ˜Š
Download Telegram
Join the channel for react JS class
<script>
let obj = {
key1:{
sub: "ReactJS"
}
}
//let {key1} =obj;
//let {sub} =key1;
document.write(obj.key1.sub);
</script>
direct extraction from object
<script>
let obj={
key1:{
sub: "ReactJS"
},
key2:{
sub: "NodeJs"
}
}
let {key1,key2} = obj;
let {sub:sub1}=key1;
let {sub:sub2}=key2;
document.write(sub1,sub2);
//ReactJS NodeJs
</script>
<script>
let obj={
key1:function(){
return hello
}
};
let {key1} =obj;
document.write(key1());

</script>
<script>
let obj = {
key1:function(){
return{

key1 :"hello"
}
}
};
let {key1} = obj;
let a=key1();
document.write(a.key1);
</script>
<script>

let obj = {

name: "Sathya",

batch: "K L M N Batck",

course: "ReactJS",

students: [{rno: 111, name: "bhavani", company : "tcs"},

{rno 222, name : "bhavani1", company: "infosys"}, {rno 333, name: "bhavani2", company : "wipro"},

{rno 444, name: "bhavan3", company : "amazon"}, {rno 555, name : "bhavan4", company "twitter"}],

feedback:

};

"good"

</script>
<script>
let arr = [10,20,30,40,50];
let newArr= arr.map((element,index)=>{
return element*10;
})
document.write(newArr);
100,200,300,400,500
</script>
let arr = [{key1: "Hello_1"},{key1: "Hello_2"},{key1: "Hello_3"},{key1: "Hello_4"},{key1:

"Hello_5"}];

o/p:

โ–ผ(5) [{-}, {-}, {-}, {---}, {---}] @

โ–ถ0: {key1: 'Hello_1', key2: 'Welcome_1'}

1: {key1: 'Hello_2', key2: 'Welcome_2'}

โ–บ 2: {key1: 'Hello_3', key2: 'Welcome_3'}

โ–ถ3: {key1: 'Hello_4', key2: 'Welcome_4'}

โ–ถ4: {key1: 'Hello_5', key2: 'Welcome 5'}
use Map method for this
<script>
let arr =[10000,20000,30000,40000,50000];
let newArr= arr.filter((element,index)=>{
return element>=30000;
})
document.write(newArr)
30000,40000,50000
</script>
Problem 4
Complexity: Medium
You have been given a set of n integers. You need to write a program that will divide the set in two subsets of n/2 sizes each such that the difference of the sum of two subsets is as minimum as possible.
Note: n is even, hence sizes of two subsets must be strictly n/2

For example,

Input = {3, 4, 5, 3, 100, 1, 83, 54, 23, 20}
Output = {4, 100, 1, 23, 20} and {3, 5, 3, 83, 54}.
Both output subsets are of size 5 and sum of elements in both subsets is same (148 and 148).
Problem 3
Complexity: Medium
You have to find square root of a given positive integer. If it is not a perfect square, compute the square root to a precision of 3 digits after decimal point.

You cannot use predefined functions for computing the square root.

Multiple solutions to solve this would be considered a plus.
Problem 2
Complexity: Low
You have been given a set of n strings in an array. Each string contains one or more words separated by spaces.
You have another string called โ€œSearch Stringโ€. You need to match the search string based on word boundary.


For example,

Below are the string elements in array (one element in each line)
Cecilio Johnes
Cordell Acott
Curtice Bleue
Dalis Menary
Emanuele Barstock
Emmy Bradane
Gian Cossington
Jamaal Danilevich
Kerri Wilce
Liuka Cowern
Merrel Cornuau
Marena Appleton
Marlee Stobo
Rochette Brew
Rudyard Abbate
Sharona Climo
Shirlee Titcumb
Taite Joriot
Taite Huntriss
Zach Simchenko

Search String s = "cโ€;
Output should be: String โ€œcโ€ (case insensitive) matching the first letter in each word. Following entries will be selected.
Cecilio Johnes
Cordell Acott
Curtice Bleue
Gian Cossington
Liuka Cowern
Merrel Cornuau
Sharona Climo



Search String s = "coโ€;
Output should be: String โ€œcoโ€ (case insensitive) matching the first two letters in each word. Following entries will be selected.
Cordell Acott
Gian Cossington
Liuka Cowern
Merrel Cornuau
๐Ÿฅฐ1
Problem 1
Complexity: Low

You are given two strings.
First string is a large text. For example

โ€œIt is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).โ€

Second string is a short one. For example โ€œisโ€.

You will need to write a program that will remove all occurrences of the second string from the first string.

Note: You will need to do this with pure for/while loops. Do not use any external functions like substring.